From: Anoop on
Whenever we use the command: "/usr/ucb/ps auxgwww" with 'grep java'
for example, we see that it writes a file to the /tmp file. Further
more the file it writes is owned by root/sys and we do not have the
access to root. Due to this we are seeing disk space issues on /tmp.
It seems many of our other processes also use /tmp to write buffer
files or something and those processes do not come up.

So my question is why does /usr/ucb/ps have to write to /tmp (or
swap?) Is that behavior the same as ps. I mean would it be better if
we switch to ps (although we will have a tough time identifying our
processes).

Is there a switch in the /usr/ucb/ps command to tell it not to write
to /tmp or maybe write somewhere else or at least write without making
root the owner of the file. This will help us so that we may delete
the file(s) in future if it fills up /tmp.

Thanks,
Anoop

From: hume.spamfilter on
Anoop <anoopkumarv(a)gmail.com> wrote:
> Whenever we use the command: "/usr/ucb/ps auxgwww" with 'grep java'
> for example, we see that it writes a file to the /tmp file. Further

Are you sure? I just tested it, and it did not. I even ran it with
truss, and it didn't touch /tmp.

Another question is, why are you using /usr/ucb/ps at all?

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/
From: Neal A. Lucier on
hume.spamfilter(a)bofh.ca wrote:
> Anoop <anoopkumarv(a)gmail.com> wrote:
>
>>Whenever we use the command: "/usr/ucb/ps auxgwww" with 'grep java'
>>for example, we see that it writes a file to the /tmp file. Further
>
>
> Are you sure? I just tested it, and it did not. I even ran it with
> truss, and it didn't touch /tmp.
>
> Another question is, why are you using /usr/ucb/ps at all?
>

Because ps has the following limitations in displaying the entire length
of the command and it's associated arguments as noted by the man page,
see below (on Solaris 9 12/03). With the "www" option passed to
'/usr/ucb/ps' these limitations do not exist. The SysV way to do this
would probably be to use the various p-commands to interogate processes,
but /usr/ucb/ps is much easier.

CMD (all)
The command name (the full command name and its argu-
ments, up to a limit of 80 characters, are printed
under the -f option).

args The command with all its arguments as a string. The
implementation may truncate this value to the field
width; it is implementation-dependent whether any
further truncation occurs. It is unspecified whether
the string represented is a version of the argument
list as it was passed to the command when it started,
or is a version of the arguments as they may have been
modified by the application. Applications cannot
depend on being able to modify their argument list and
having that modification be reflected in the output of
ps. The Solaris implementation limits the string to 80
bytes; the string is the version of the argument list
as it was passed to the command when it started.


Neal
From: Michael Tosch on
Neal A. Lucier wrote:
> hume.spamfilter(a)bofh.ca wrote:
>> Anoop <anoopkumarv(a)gmail.com> wrote:
>>
>>> Whenever we use the command: "/usr/ucb/ps auxgwww" with 'grep java'
>>> for example, we see that it writes a file to the /tmp file. Further
>>
>>
>> Are you sure? I just tested it, and it did not. I even ran it with
>> truss, and it didn't touch /tmp.
>>
>> Another question is, why are you using /usr/ucb/ps at all?
>>
>

Solaris 8 /usr/ucb/ps stores a temp file /tmp/ups_data.
But not in Solaris 9 and 10.

--
Michael Tosch @ hp : com
From: Casper H.S. Dik on
"Anoop" <anoopkumarv(a)gmail.com> writes:

>Whenever we use the command: "/usr/ucb/ps auxgwww" with 'grep java'
>for example, we see that it writes a file to the /tmp file. Further
>more the file it writes is owned by root/sys and we do not have the
>access to root. Due to this we are seeing disk space issues on /tmp.
>It seems many of our other processes also use /tmp to write buffer
>files or something and those processes do not come up.

What type of files does it write to /tmp?

Are you *sure* it is Sun's version of /usr/ucb/ps?
(Note that the actual binary is supposed to live under
/usr/ucb/{sparcv7,sparcv9,i86,amd64}/ps)

>So my question is why does /usr/ucb/ps have to write to /tmp (or
>swap?) Is that behavior the same as ps. I mean would it be better if
>we switch to ps (although we will have a tough time identifying our
>processes).

Tried pgrep?

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Patch Downloads on Solaris 10 x86
Next: seaport absent