Xref: utzoo comp.sources.wanted:4386 comp.sys.att:3550 unix-pc.general:866 Path: utzoo!utgpu!water!watmath!uunet!labrea!agate!helios.ee.lbl.gov!lll-tis!pacbell!att!mtunx!icus!lenny From: lenny@icus.UUCP (Lenny Tropiano) Newsgroups: comp.sources.wanted,comp.sys.att,unix-pc.general Subject: Re: Wanted Dead or Alive: A ps that displays all command args... Summary: Ok, I was wrong. Message-ID: <398@icus.UUCP> Date: 20 Jun 88 18:30:45 GMT References: <103@tarkus.UUCP> <2300002@cpe> Reply-To: lenny@icus.UUCP (Lenny Tropiano) Organization: ICUS Software Systems, Islip, New York Lines: 39 In article <2300002@cpe> tif@cpe.UUCP writes: |> |>Written 6:57 pm Jun 13, 1988 by tarkus.UUCP!jcs in cpe:comp.sources.w |>>Has anybody got a ps program that will display the arguments that were passed |>>to the currently running programs? The version that came with the machine |>>has got to go, I can't stand it anymore.. Thanks in advance. |> |>I thought the "-f" option to ps was standard. |> |>For lenny who said it can't be done: It can be done, it's just not |>that straight-forward. |> |> Paul Chamberlain |> Computer Product Engineering, Tandy Corp. |> ihnp4!sys1!cpe!tif Ok. I was wrong ... It can be done. For some reason AT&T took a short-cut and only displayed the u_comm string in the user block that only contains the first argument. The real way of doing it and really the "-f" option of the ps(1) should do this. But as usual... A few people mentioned the way of doing it is to look up the user's stack space in memory and read back the arguments from the "argv-block". Likewise you could also print the environment (like Bezerkley BSD UNIX does)... If anyone cares to do this before I hack it myself, by all means. Of course the argv can be changed easily by a program giving you erroneous results, the user.u_comm cannot be changed [as easily :-), I learned never to say never]... -Lenny -- US MAIL : Lenny Tropiano, ICUS Software Systems IIIII CCC U U SSS PO Box 1 I C U U S Islip Terrace, New York 11752 I C U U SS PHONE : (516) 968-8576 [H] (516) 582-5525 [W] I C U U S TELEX : 154232428 [ICUS] IIIII CCC UUU SSS AT&T MAIL: ...attmail!icus!lenny UUCP : ...{talcott, boulder, pacbell, sbcs, mtune, bc-cis}!icus!lenny