Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsThis is an easy one for grep experts
My top result is like this
top -b -p 3002 -n 1
top - 14:07:30 up 14 days, 4:31, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1% us, 0.6% sy, 0.0% ni, 97.0% id, 0.1% wa, 0.0% hi, 0.0% si
Mem: 2074844k total, 1646740k used, 428104k free, 108336k buffers
Swap: 1020116k total, 192k used, 1019924k free, 1225532k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3002 root 16 0 4748 948 548 S 0.0 0.1 0:00.04 crond
I would to just grep and display the value under %MEM (in this case 0.1).
So I am looking for the command
top -b -p 3002 -n 1 | grep <something> that can give me 0.1
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: KdoPosted on 2007-11-09 at 12:13:26ID: 20252577
Comments are available to members only. Sign up or Log in to view these comments.