Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How would I process the values for %soft straight down so I can get just a listing of 0.02, 0.07, 0.00, 0.00, 0.00 in a column format.
If I use awk how do I process the field since it is a random number.
Such as
awk '/15.46:01/ {print $8}' system_statistics | less will give me the value of that single line. How do I go about processing the entire column without specifying individual lines.
How would I process the values for %soft straight down so I can get just a listing of 0.02, 0.07, 0.00, 0.00, 0.00 in a column format.
If I use awk how do I process the field since it is a random number.
Where is there a random number?
Quote:
Such as
awk '/15.46:01/ {print $8}' system_statistics | less will give me the value of that single line. How do I go about processing the entire column without specifying individual lines.
Thanks.
Thanks for the reply, I have obtained what I needed with your awk '{print $8}' command. However, I get a ton of values. How do I narrow them down to just a specific value such as the %idle cpu rate. I tried awk '{print $8}' | grep %idle but all I get is %idle %idle %idle. The goal is to just obtain the field: %idle statistics.
96.66
92.11
97.94
97.70
98.90
This is a snapshot of a server for every 5 minutes so the file is huge
Here are the awk results:
awk '{print $8}'
%idle
96.66
92.11
97.94
97.70
98.90
TX-ERR
0
BMRU
BMRU
BMRU
BMRU
BMRU
BMRU
0
wkB/s
65.91
wkB/s
289.93
wkB/s
270.20
Last edited by keysorsoze; 01-17-2007 at 09:10 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.