ps


List pid of process that is under 24 hrs old


Using QNX I am trying to list the processes that have been running for under 24 hours. I have the following code that will list every process' PID and elapsed time running. I have tried multiple loops to list only the PID's that have 'etime' greater than 2400 with no success.
ps -eo pid,etime,cmd | sed s/://g
returns
PID ELAPSED CMD
1 4618
2 4618 slogger
4099 4618 pci-bios
4100 4618 io-usb
4101 4618 io-hid
4102 4618 devc-con-hid
4103 4618 devb-eide
204808 4612 inetd
229385 4612 /pclogd
81930 4614 pipe
81931 4614 mqueue
94220 4614 dumper
81933 4614 tinit
94222 4614 io-net
Basially, I need if [elapsed -lt 2400];then list pid
ps -eo pid,etime,cmd | sed s/://g |
awk '$2 < 2400 {printf "%-10s %-10s %-20s\n", $2, $1, $3 }'

Related Links

Base64 encoding in Powershell
Local processes of head node of a PBS cluster
Execlp says No such file or directory
PS command column display full detail
Set Title in postscript header, produced by IDL
Android/iOS app product description photos
Check whether process running linux and start with certain description
List pid of process that is under 24 hrs old
how to identify page boundries in a .prn file of multiple page job

Categories

HOME
airflow
joomla
sip
dronekit
popover
gap-system
ebay-api
thermal-printer
mediarecorder
browserstack
software-collections
segmentation-fault
google-search-appliance
dynamics-crm-2011
xmlhttprequest
hdf5
camunda
mbed
lambda-calculus
web-testing
background-image
openam
virtuemart
git-branch
typedef
concatenation
advertising
priority-queue
akavache
gulp-jshint
formtastic
drombler-fx
kundera
folder
xlib
edsdk
lines
spring-oauth2
epub
framebuffer
armadillo
server-side-swift
bzip2
test-kitchen
binary-decision-diagram
spring-webflow-2
jks
infovis
g77
spring-cloud-bus
lucee
bioperl
critical-section
chain
rmq
robotc
therubyracer
android-tabs
geokit
razorengine
custom-build-step
trendline
angular-promise
tvp
producer-consumer
eaaccessory
opennebula
minko
backtrace
qxorm
caption
fxmlloader
jsonschema2pojo
system.net
sat4j
mdp
scidb
dylan
mandelbrot
pyxplot
qmainwindow
pymel
correctness
mail-gem
openafs
flatten
jqueryi-ui-buttonset
virtual-printer
windows-xp-embedded
symfony-1.2
hs-err
norton
p4.net
morfik
opengl-to-opengles
cons

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile