Subject: Re: sorting ps output
To: None <tech-userlevel@netbsd.org>
From: Takahiro Kambe <taca@back-street.net>
List: tech-userlevel
Date: 03/08/2003 14:27:05
In message <20030304172512.H3346@snowdrop.l8s.co.uk>
on Tue, 4 Mar 2003 17:25:12 +0000,
David Laight <david@l8s.co.uk> wrote:
> @@ -361,6 +363,8 @@ main(argc, argv)
>
> if (!fmt)
> parsefmt(dfmt);
> + /* add default sort criteria */
> + parsesort("tdev,pid");
>
> /*
> * scan requested variables, noting what structures are needed.
It seems that default ps output has changed. Is it intended result?
Output of "ps ax" on current:
PID TT STAT TIME COMMAND
348 p0 Rs 0:00.13 -zsh
1047 p0 R+ 0:00.00 ps ax
333 E0 SWs+ 0:00.02 /usr/libexec/getty Pc ttyE0
334 E1 SWs+ 0:00.01 /usr/libexec/getty Pc ttyE1
0 ?? DKs 0:00.01 [swapper]
1 ?? Ss 0:00.02 init
2 ?? DK 0:00.00 [atapibus0]
3 ?? DK 0:00.00 [usb0]
4 ?? DK 0:00.00 [usbtask]
...
Output of "ps ax" on 1.6:
PID TT STAT TIME COMMAND
0 ?? DKs 0:01.79 [swapper]
1 ?? Ss 0:01.92 init -s
2 ?? DK 0:00.14 [usb0]
3 ?? DK 0:00.00 [usbtask]
4 ?? DK 0:00.00 [scsibus0]
5 ?? DK 0:00.00 [scsibus1]
6 ?? DK 0:00.00 [pms0]
7 ?? DK 0:19.16 [apm0]
8 ?? DK 3:17.86 [pagedaemon]
...
I think that default should be the same as 1.6.
--
Takahiro Kambe <taca@back-street.net>