Diary SiteMap RecentChanges About Contact 2012-10 Calendar

Search:

Matching Pages:

2012-10-17 awk

Last edit

Summary: Added: Now we just need to figure out who this user 1231 is. Who needs 233 php-cgi processes running?

Changed:

< Thanks, ##awk##. You might be awkward to use, but you get the job done.

to

> Thanks, ##awk##. You might be awkward to use, but you get the job done. Now we just need to figure out who this user 1231 is. Who needs 233 php-cgi processes running?


Sometimes it’s hard to remember how cool awk used to be – I haven’t used awk ever since I switched to Perl about 15 years ago. :)

Today I wondered who had so many sleeping php-cgi processes on the server hosting Campaign Wiki:

ps aux | awk '/php-cgi$/ { user[$1]++} END { for (u in user) { print u, user[u] }}'
1231 233
greywulf 1

Thanks, awk. You might be awkward to use, but you get the job done. Now we just need to figure out who this user 1231 is. Who needs 233 php-cgi processes running?

Tags: RSS

Read Comments (2)

Show Google +1