summaryrefslogtreecommitdiffstats
path: root/web/input/doc/faq/ps-on-solaris.md
blob: 8aa90dfbe19ce3fb3a431fa3e2b39c83b7c199fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
title: Process listings on Solaris
parent: FAQ
---

# Why use pst3 for check\_procs on Solaris?

Solaris systems restrict the information that is available when you run `ps`.
On other Unix systems, running `ps` will list you the entire arguments, but
Solaris restricts the arguments to the first 64 characters at the kernel.

This is a problem if you need to access the arguments to find out a specific
process (common for listing Java programs).

`/usr/ucb/ps` does list the full arguments, but only for your own processes.
If you are root, then running `/usr/ucb/ps` can get the full arguments for all
processes.  However, the columns for `RSS` and `VSZ` merge together when the
values are too large and `check_procs` cannot pull the value out correctly.

The chosen approach is to create our own `ps`-like command, `pst3`.  This
outputs the required information in a known format for `check_procs` to parse.
This is the default if you run `./configure` on a Solaris system.

Because `pst3` needs access to some kernel structures, it needs to be compiled
in 32 and 64 bit modes.

If you are comfortable with the limitations, it is possible to use a Solaris
`ps` command by specifying these options to `./configure`:

    --with-ps-command="/usr/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args'" \
    --with-ps-format="%s %d %d %d %d %d %f %s %s %n" \
    --with-ps-cols=10 \
    --with-ps-varlist="procstat,&procuid,&procpid,&procppid,\
    &procvsz,&procrss,&procpcpu,procetime,procprog,&pos"

The `--with-ps-varlist` should be on one line - separated here for
readability.

<!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %-->