Sample Header Ad - 728x90

What does the 'ps -o cputime' show in the TIME column?

0 votes
1 answer
86 views
The macOS ps gives the TIME like this:
UID   PID  PPID   C STIME   TTY           TIME CMD
    0 50769 80598   0  9:09pm ttys000    0:00.00 egrep 96222|PID
  666 96222 95653   0 10:09pm ttys006    0:00.01 /bin/bash ./count_numbers_octal.sh
  666 96226 96222   0 10:09pm ttys006  224:07.09 od -o
  666 96227 96222   0 10:09pm ttys006  613:25.59 cut -c1
The manual page of ps explains it like this:
The time the command started.  If the command started less than 24
hours ago, the start time is displayed using the “%l:ps.1p” format
described in strftime(3).  If the command started less than 7 days
ago, the start time is displayed using the “%a6.15p” format.
Otherwise, the start time is displayed using the “%e%b%y” format.
What exactly does that mean? I've looked at strftime(3), and it isn't clear to me if it is [seconds].[milliseconds] or [seconds].[tenth of seconds] or something else.
Asked by Peter Brooks (283 rep)
Nov 5, 2023, 09:15 PM
Last activity: Nov 18, 2023, 03:42 PM