I just finished doing a buildworld in multi-user mode (which seemed to work OK... though only time will tell :D) to RELENG_4. However, when I run 'ps aux', the output seems to be inverted... IE processes with lower PID's are on the bottom. Is this normal? Here's an example: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 33444 77.7 3.5 13640 13512 p0 R+ 3:42PM 0:02.73 /usr/libexec/cc1plus -quiet -dumpbase opt_range.cc -march=pentiumpro root 33443 4.2 0.4 1696 1540 p0 S+ 3:42PM 0:00.13 /usr/libexec/cpp0 -lang-c++ -I. -I. -I.. -I../bdb/build_unix -I../inn root 33442 0.0 0.1 308 200 p0 S+ 3:42PM 0:00.01 cc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="/usr/local" -DDATADIR="/var/d root 33440 0.0 0.1 664 476 p0 S+ 3:42PM 0:00.01 /bin/sh ../depcomp cc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="/usr/local root 33438 0.0 0.1 636 448 p0 S+ 3:42PM 0:00.00 /bin/sh -ec source='opt_range.cc' object='opt_range.o' libtool=no de nagios 33431 0.0 0.1 460 244 ?? S 3:42PM 0:00.00 /sbin/ping -n -c 5 192.168.30.1 nagios 33430 0.0 0.2 996 704 ?? S 3:42PM 0:00.01 /usr/local/libexec/nagios/check_ping -H 192.168.30.1 -w 100.0,20% -c nagios 33429 0.0 0.1 632 440 ?? S 3:42PM 0:00.00 sh -c /usr/local/libexec/nagios/check_ping -H 192.168.30.1 -w 100.0,2 nagios 33428 0.0 0.4 2408 1636 ?? S 3:42PM 0:00.00 /usr/local/bin/nagios -d /usr/local/etc/nagios/nagios.cfg [.. Taken out for the sake of brevity ..] daemon 92 0.0 0.2 960 628 ?? Is 3:07PM 0:00.00 /usr/sbin/portmap root 91 0.0 0.3 1388 1024 ?? S 3:07PM 0:00.02 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid root 89 0.0 0.3 1336 972 ?? Ss 3:07PM 0:00.17 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid root 85 0.0 0.2 992 684 ?? Ss 3:07PM 0:00.09 /usr/sbin/syslogd -ss -m 0 -f /etc/syslog.conf root 27 0.0 0.0 212 96 ?? Is 8:07AM 0:00.00 adjkerntz -i root 9 0.0 0.0 0 0 ?? DL 8:07AM 0:00.02 (vnlru) root 8 0.0 0.0 0 0 ?? DL 8:07AM 0:01.42 (syncer) root 7 0.0 0.0 0 0 ?? DL 8:07AM 0:00.43 (bufdaemon) root 6 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 (vmdaemon) root 5 0.0 0.0 0 0 ?? DL 8:07AM 0:00.01 (pagedaemon) root 4 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 (usbtask) root 3 0.0 0.0 0 0 ?? DL 8:07AM 0:00.24 (usb0) root 2 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 (taskqueue) root 1 0.0 0.1 556 336 ?? SLs 8:07AM 0:00.20 /sbin/init -- root 33450 0.0 0.1 516 248 p1 R+ 3:42PM 0:00.00 ps aux root 0 0.0 0.0 0 0 ?? DLs 8:07AM 0:00.00 (swapper) root 33445 0.0 0.2 956 704 p0 S+ 3:42PM 0:00.00 /usr/libexec/elf/as -o opt_range.o - root@smith:~# Did I break something? (Again!?) -Kyle Mott
> Seems normal to me. I don't remember ps output being in order, unless you pipe it to > sort. > > Jeff Love > Burgh Gaming > >> I just finished doing a buildworld in multi-user mode (which seemed to >> work OK... though only time will tell :D) to RELENG_4. However, when I >> run 'ps aux', the output seems to be inverted... IE processes with lower >> PID's are on the bottom. Is this normal? Here's an example: >> >> >> USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND >> root 33444 77.7 3.5 13640 13512 p0 R+ 3:42PM 0:02.73 >> /usr/libexec/cc1plus -quiet -dumpbase opt_range.cc -march=pentiumpro >> root 33443 4.2 0.4 1696 1540 p0 S+ 3:42PM 0:00.13 >> /usr/libexec/cpp0 -lang-c++ -I. -I. -I.. -I../bdb/build_unix -I../inn >> root 33442 0.0 0.1 308 200 p0 S+ 3:42PM 0:00.01 cc >> -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="/usr/local" -DDATADIR="/var/d >> root 33440 0.0 0.1 664 476 p0 S+ 3:42PM 0:00.01 /bin/sh >> ../depcomp cc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="/usr/local >> root 33438 0.0 0.1 636 448 p0 S+ 3:42PM 0:00.00 /bin/sh >> -ec source='opt_range.cc' object='opt_range.o' libtool=no de >> nagios 33431 0.0 0.1 460 244 ?? S 3:42PM 0:00.00 /sbin/ping >> -n -c 5 192.168.30.1 >> nagios 33430 0.0 0.2 996 704 ?? S 3:42PM 0:00.01 >> /usr/local/libexec/nagios/check_ping -H 192.168.30.1 -w 100.0,20% -c >> nagios 33429 0.0 0.1 632 440 ?? S 3:42PM 0:00.00 sh -c >> /usr/local/libexec/nagios/check_ping -H 192.168.30.1 -w 100.0,2 >> nagios 33428 0.0 0.4 2408 1636 ?? S 3:42PM 0:00.00 >> /usr/local/bin/nagios -d /usr/local/etc/nagios/nagios.cfg >> [.. Taken out for the sake of brevity ..] >> daemon 92 0.0 0.2 960 628 ?? Is 3:07PM 0:00.00 >> /usr/sbin/portmap >> root 91 0.0 0.3 1388 1024 ?? S 3:07PM 0:00.02 >> /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid >> root 89 0.0 0.3 1336 972 ?? Ss 3:07PM 0:00.17 >> /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid >> root 85 0.0 0.2 992 684 ?? Ss 3:07PM 0:00.09 >> /usr/sbin/syslogd -ss -m 0 -f /etc/syslog.conf >> root 27 0.0 0.0 212 96 ?? Is 8:07AM 0:00.00 adjkerntz >> -i >> root 9 0.0 0.0 0 0 ?? DL 8:07AM 0:00.02 (vnlru) >> root 8 0.0 0.0 0 0 ?? DL 8:07AM 0:01.42 (syncer) >> root 7 0.0 0.0 0 0 ?? DL 8:07AM 0:00.43 >> (bufdaemon) >> root 6 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 >> (vmdaemon) >> root 5 0.0 0.0 0 0 ?? DL 8:07AM 0:00.01 >> (pagedaemon) >> root 4 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 (usbtask) >> root 3 0.0 0.0 0 0 ?? DL 8:07AM 0:00.24 (usb0) >> root 2 0.0 0.0 0 0 ?? DL 8:07AM 0:00.00 >> (taskqueue) >> root 1 0.0 0.1 556 336 ?? SLs 8:07AM 0:00.20 /sbin/init >> -- >> root 33450 0.0 0.1 516 248 p1 R+ 3:42PM 0:00.00 ps aux >> root 0 0.0 0.0 0 0 ?? DLs 8:07AM 0:00.00 (swapper) >> root 33445 0.0 0.2 956 704 p0 S+ 3:42PM 0:00.00 >> /usr/libexec/elf/as -o opt_range.o - >> root@smith:~# >> >> >> Did I break something? (Again!?) >> >> >> -Kyle Mott >> >> >> >> >> >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >> > >
At 3:51 PM -0700 6/8/04, Kyle Mott wrote:>I just finished doing a buildworld in multi-user mode (which seemed >to work OK... though only time will tell :D) to RELENG_4. However, >when I run 'ps aux', the output seems to be inverted... IE processes >with lower PID's are on the bottom. Is this normal? Here's an example: > > >USER PID %CPU %MEM VSZ RSS >root 33444 77.7 3.5 13640 ... >root 33443 4.2 0.4 1696 ... >root 33442 0.0 0.1 308 ... >root 33440 0.0 0.1 664 ... >root 33438 0.0 0.1 636 ...From the man page, `u' implies `-r', which means "sort by CPU time". Processes with the exact same CPU time will be sorted by PID, as you were expecting. It used to be that processes with "close to the same CPU time" were treated as being exactly the same (due to round-off error), and thus it used be much more likely to see many processes listed in PID order. It's possible that there's some bug there, but the last time I looked into this it seemed to be doing the right thing. I plan to look into it again, because someone else has reported that there might be a bug in there. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu