0
I am writing a shell script that gets all the current processes running, and pipes them into grep to filter out the ones I need.
But I also need it to give me a timestamp, either when the ps
occurs, or when the process was started. It doesn't matter, I just need a time. All the processes just take fractions of a second.
My command is this:
ps -U USERNAME -o rss=MEM,comm=CMD,pid=PID
I tried going like
ps -U USERNAME -o rss=MEM,comm=CMD,pid=PID, start=START
but that just gives me a time like hh:mm:ss
. I need something more precise than this. Timestamps are ideal.
What should I do?