GNU = inventions that nobody wants?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users GNU = inventions that nobody wants?
# 1  
Old 01-04-2018
GNU = inventions that nobody wants?

Stumbled over this today on GNU/Linux, output from ps -fp :
Code:
UID        PID  PPID  C STIME TTY          TIME CMD
root      3516     1  0  2017 ?        00:00:13 syslogd -m 0
UID        PID  PPID  C STIME TTY          TIME CMD
syslog    2952     1  0  2017 ?        00:02:08 rsyslogd

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

These 3 Users Gave Thanks to MadeInGermany For This Post:
# 2  
Old 01-04-2018
May not be too satisfying, but that's the documented behaviour for (man ps)
Quote:
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.
This User Gave Thanks to RudiC For This Post:
# 3  
Old 01-04-2018
Ah yes, the non-standard "START" and "BSDSTART" say it correctly
Code:
ps -p 3516 -o stime,start,bsdstart,lstart,etime
STIME  STARTED  START                  STARTED     ELAPSED
 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.
This User Gave Thanks to MadeInGermany For This Post:
# 4  
Old 01-07-2018
Interesting. To be honest i find the behavior of df -h much more annoying. Here is my PC:

Code:
# 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.

bakunin
These 2 Users Gave Thanks to bakunin For This Post:
# 5  
Old 01-08-2018
df -Bg should work
These 2 Users Gave Thanks to CarloM For This Post:
# 6  
Old 01-08-2018
Quote:
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!

bakunin
# 7  
Old 01-08-2018
df -Bg -xtmpfs -xdevtmpfs! Getting a tad unwieldy, but I guess you could alias it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using GNU Regex

I'm just learning Regex and while testing my understanding I received some unexpected results. I created example.txt with the text "abcddd". Running the command grep --color 'd' example.txt I received the results: "abcddd" with the first and second letter d highlighted in red. So... (1 Reply)
Discussion started by: rthomas529
1 Replies

2. Debian

GNU Barcodes

I wish to be able to print a barcode .5 inches from top of the page and centered. I generate the barcode - yes 12345 | head -84 | barcode -p 5x5.0cm -umm -e CODE39 > test.ps; and print - lpr -o media=letter -#1 -P LJ1012 /var/www/test.ps -o page-top=33 -o page-bottom=44 -o... (1 Reply)
Discussion started by: Meow613
1 Replies

3. AIX

GNU findutils

Hi, We are running 64-bit AIX 6.1. I have gcc 4.2.0 on our system. I'd like to get the latest copy of GNU findutils on the server. From what I see, I have two basic options: 1) download source code and compile using gcc or 2) download rpm and install. Would someone please point me in the right... (1 Reply)
Discussion started by: Eben Yong
1 Replies

4. BSD

Anyone using GNU BSD?

Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies

5. UNIX for Advanced & Expert Users

non GNU utilities

Hi Chaps, Does anyone know of a source of proprietary unix utilities. I often fall into the trap of testing a spot of code on my linux machine, posting the answer in the forums and then realise that the solution may only work with the GNU utils that I use, and not standard posix ones (if there are... (4 Replies)
Discussion started by: wempy
4 Replies

6. UNIX for Advanced & Expert Users

GNU screen

Hello, One of the things I like about screen is that it has a scrollback buffer, which if you go into the copy mode, will let you go back for a specified number of line. Is there a way to extend the number of scrollback lines in screen? I've looked thoroughly online and I could not find a... (2 Replies)
Discussion started by: neked
2 Replies

7. HP-UX

Gnu tools for hp-ux

Hi everyone, I urgently need to install all GNU tools for HP-UX 11.23. Is there somewhere i can get the whole package as opposed to download each of them separate. I'm really stuck, i need them especially gcc. kindly assist. (2 Replies)
Discussion started by: dowell
2 Replies

8. News, Links, Events and Announcements

GNU/Solaris

i am looking forward to this one: http://www.opensolaris.org/jive/message.jspa?messageID=11672#11672 i thought that the gentoo community would release the first opensolaris distri, but perhabs we will get a chance to try opensolaris within 1/2 hour installation and not 12 hours "gentoo-stage_1"... (2 Replies)
Discussion started by: pressy
2 Replies

9. Programming

Gnu C

hello, i have use only TURBO C for programming.i used to did only on windows OS. but now i am trying to program on Linux systems.so i heard about GNU C tools and compiler. i am a bit confused and i want to know a very simplified answer for it. can anybody help me. what a heck is this GNU...... ... (1 Reply)
Discussion started by: vibhory2j
1 Replies
Login or Register to Ask a Question