Home Man
Today's Posts

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

GNU = inventions that nobody wants?

👤 Login to reply

Thread Tools Search this Thread
# 1  
Old 01-04-2018
GNU = inventions that nobody wants?

Stumbled over this today on GNU/Linux, output from ps -fp :
root      3516     1  0  2017 ?        00:00:13 syslogd -m 0
syslog    2952     1  0  2017 ?        00:02:08 rsyslogd

STIME showing 2017? Who needs this gimmick? We have January 2018!
Much better on Unix:
     UID   PID  PPID   C    STIME TTY         TIME CMD
    root   906     1   0   Dec 16 ?           0:07 /usr/sbin/syslogd

The Following 3 Users Say Thank You to MadeInGermany For This Useful Post:
dodona (01-04-2018), Neo (01-04-2018), RavinderSingh13 (01-04-2018)
# 2  
Old 01-04-2018
May not be too satisfying, but that's the documented behaviour for (man ps)
start_time START starting time or date of the process. Only the year will be displayed if the process was not started the same year ps was invoked, or "MmmDD" if it was not started the same day, or "HH:MM" otherwise. See also bsdstart, start, lstart, and stime.
Using e.g. start or bsdstart as format specifiers, it will (presumably) behave like the Unix example that you gave above.
The Following User Says Thank You to RudiC For This Useful Post:
MadeInGermany (01-04-2018)
# 3  
Old 01-04-2018
Ah yes, the non-standard "START" and "BSDSTART" say it correctly
ps -p 3516 -o stime,start,bsdstart,lstart,etime
 2017   Dec 19 Dec 19 Tue Dec 19 17:10:57 2017 15-21:43:58

But a casual ps -f gives STIME and that's unusable.
A bit more intelligent would have been to check the "etime" and switch to the year if the etime is > 360 days.
The Following User Says Thank You to MadeInGermany For This Useful Post:
dodona (01-04-2018)
# 4  
Old 01-07-2018
Interesting. To be honest i find the behavior of df -h much more annoying. Here is my PC:

# df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                        63G     0   63G   0% /dev
tmpfs                       13G   11M   13G   1% /run
/dev/mapper/rootvg-rootlv  9.8G  5.6G  3.7G  61% /
tmpfs                       63G  168K   63G   1% /dev/shm
tmpfs                      5.0M  4.0K  5.0M   1% /run/lock
tmpfs                       63G     0   63G   0% /sys/fs/cgroup
/dev/mapper/rootvg-altrlv  9.8G  8.2G  1.2G  88% /altroot
/dev/mapper/rootvg-homelv  9.8G  2.4G  7.0G  25% /home
/dev/mapper/rootvg-imglv    49G  6.5G   41G  14% /opt/images
/dev/sda1                  511M  4.6M  507M   1% /boot/efi
tmpfs                       13G   16K   13G   1% /run/user/1000

First: I would like to see the filesystems not all sorts of gimmicks. The output of mount is equally unusable, because ones wades through lists of "virtual filesystems", which are no filesystems at all.

But what takes the biscuit is the different units in which the output is formatted: MB, GB and even KB all mixed together and you have no immediate picture what is filled to which extent. In AIX i use df -g and know what i want to know within a second.

The Following 2 Users Say Thank You to bakunin For This Useful Post:
dodona (01-08-2018), Scott (01-08-2018)
# 5  
Old 01-08-2018
df -Bg should work
The Following 2 Users Say Thank You to CarloM For This Useful Post:
bakunin (01-08-2018), MadeInGermany (01-08-2018)
# 6  
Old 01-08-2018
Originally Posted by CarloM
df -Bg should work
Thanks a lot, i didn't know that. This still leaves the "tmpfs" entries and the "udev", but at least one of the problems is solved. Good catch!

# 7  
Old 01-08-2018
df -Bg -xtmpfs -xdevtmpfs! Getting a tad unwieldy, but I guess you could alias it.
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using GNU Regex rthomas529 Shell Programming and Scripting 1 08-07-2016 07:58 PM
GNU findutils Eben Yong AIX 1 11-18-2010 05:38 PM
Anyone using GNU BSD? vpsville BSD 8 02-23-2009 02:59 PM
non GNU utilities wempy UNIX for Advanced & Expert Users 4 11-01-2008 06:45 PM
GNU screen neked UNIX for Advanced & Expert Users 2 09-26-2008 12:30 AM
Gnu tools for hp-ux dowell HP-UX 2 08-05-2008 01:38 PM
GNU Date frustrated1 UNIX for Dummies Questions & Answers 5 12-21-2006 09:24 AM
GNU/Solaris pressy News, Links, Events and Announcements 2 11-07-2005 06:31 PM
Gnu C vibhory2j Programming 1 06-14-2004 03:44 PM

All times are GMT -4. The time now is 10:00 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password