How to get a running apache’s config file in SunOS (OR: how to get around ps’s 126-character output limit)
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?
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.
To use "www" you will need to ensure you use the BSD "ps" command from /usr/ucb:
/usr/ucb/ps wwwaux