Category: web development

Debug running process on Linux

I am working on putting out a serious fire now. Gettin' into that weird head space where you grow as a developer, the place where all hair is pulled out, desks are slammed, "WHAAT!?" is screamed every 45 minutes, but you can't really force yourself to take a break.

I need to make sure this worker is running properly and the stdout output is all I need to get to the juicy debug info.

First I'll get the process ID

> ps -ef | grep worker
1000 2778 2308 0 Aug28 ? 00:00:03 /home/supertastic/worker.py

The process id in this case is 2778, now let's use this snippet to watch on -p 2778

> sudo strace -f -e trace=write -e verbose=none -e write=1,2 -q -p 2778 -o "| grep '^ |' | cut -c11-60 | sed -e 's/ //g' | xxd -r -p"
2014-08-29 02:14:09,459 DEBUG Received message: {"task_type": "evaluate_submission"}
2014-08-29 02:14:09,460 INFO Running task: id=10131 task_type=evaluate_submission
2014-08-29 02:14:09,461 DEBUG evaluate_submission_task begins (job_id=10131)
2014-08-29 02:14:09,462 DEBUG evaluate_submission_task submission_id=9481 (job_id=10131)

Thanks to Lari Hotari for giving everyone a neat solution.

— 28 August 2014
…discuss this

Coeur d Alene Web Developer

I thought I'd take a moment to talk about what I do and where I do it, here it goes!

Why web development?

I've always loved solving problems. In high school one of my hobbies, if you can believe it, was helping out the teachers by making tools for grading, quizzes and studying.

In college my tastes drifted away from Computer Science. I switched to Education and my plan in life was to become a teacher. Everything changed when my mother was in a terrible motorcycle accident. She came out of a coma with a 1% chance to survive, but she suffered massive brain damage.

I dropped out of school and moved home to help, but I needed some way to make a living with a flexible schedule so I could stay with my mum. I picked back up web development and here I am today about three years later.

Why North Idaho?

Killarney Lake
Killarney Lake

It's beautiful here! I want to raise my family in this great community with safe schools and lots of outdoor activities to do. Recently I have gotten into Kayak Fishing and North Idaho is the place to do it.

Also there is so much around here for great little one day vacations like the Davenport in Spokane with dinner at Sushi.com. Or, if you're into French food, one of my other favorite restaurants is in Post Falls: Fleur de Sel—forgive them for their website!

#represent

That's how I ended up in web development and why I love CDA!

— 28 April 2014
…discuss this