1

I am currently running a SunOS 5.9 machine as a web server. It runs several apache instances, each with its own config file. I specify the config file using the -f command-line option.

What I want to do is to check, at any time, what apaches are running and with what config files. The problem is that running ps only gets me 126 characters per line, which is not enough for me to know the file.

Is there any way around this? A way around the 126-character limit would be nice, but if there's another way to get the config file from a running httpd process, that works as well.

Thanks!

EDIT: Alright, so I'm dumb and hadn't been able to find any explanations on this until now. It turns out ps on solaris truncates the arguments to 80 chars. Any idea on how would I go about getting the full arguments? Or knowing what's running?

malvim
  • 113
  • 4
  • As per davey's and hayalci's suggestions, I was able to use /usr/ucb/ps wwwaux, but it still cuts my output. The funny thing is that if I use "/usr/ucb/ps x" I get less characters on each line, but the lines are STILL cut! Like so: [ webadmin@machine ~ ] /usr/ucb/ps wwwaux webadmin 14553 0.0 0.2 8856 1896 ? S Dec 04 0:03 /projects/usr/httpd2/bin/httpd -d /projects/usr/www/myproj1 -f /projects/usr/ww [ webadmin@machine ~ ] /usr/ucb/ps x 14553 ? S 0:03 /projects/usr/httpd2/bin/httpd -d /projects/usr/www/myp So it doesn't seem like a char limit in the output of ps. Weird. – malvim Dec 10 '09 at 12:54
  • Damn, output got completely messed up. Sorry about that. :/ – malvim Dec 10 '09 at 12:55

3 Answers3

2

The command:

/usr/ucb/ps wwwaux

only prints the full command if it is run as root. Add sudo to the front of that or switch to root and it should work as expected.

Ladadadada
  • 26,337
  • 7
  • 59
  • 90
1

To use "www" you will need to ensure you use the BSD "ps" command from /usr/ucb:

/usr/ucb/ps wwwaux
gm3dmo
  • 10,057
  • 1
  • 42
  • 36
0

Try givin 'w' option to ps (optionally, multiple times)

ps www
hayalci
  • 3,631
  • 3
  • 27
  • 37