Can I please get a push in the right direction with awk/sed?
Hi Guys,
I have this task to monitor a linux box. I found a program that displays the parameters that I want and I wrote a little .sh to run that program and record output into a file.
The findings look promising but I would like to graph them.
My output (for every iteration) looks like this:
I want, instead of my .sh making this program dump the output in the raw form, to take just the timestamp and the numbers, resulting in something like this:
(then, I could run this every minute for 2-3 hours and have a csv that I could graph)
Linux shell scripting is really out of my career scope at the moment.
What do I use here? gawk/sed? Maybe a clever grep?
If you could please just show me how to do it for one value, I will figure out the rest.
Moderator's Comments:
Please use code tags as required by forum rules!
Last edited by DraxDomax; 05-16-2016 at 02:31 PM..
Reason: Added code tags.
That specification is a bit sparse. Does the file consist of a time stamp, a header line, and two parameter lines always? Does it contain these records only? Always the same structure?
Hello
I need to split big xml file into multiple files based on xml declaration. for that i have written one awk 1 liner as below
awk '/<?xml\ version/{i++}{print > "outfile."i}' test123.xml
this is producing the desired out put. but i want the the currenttimestamp with milliseconds in the... (3 Replies)
picked up a 9111-520 p5 hardware recently with 8 Gig of RAM, lots of internal disk space...6 x 140 gig
had 7.1 pre-installed, and managed to upgrade the firmware to latest SF240_xxxx
goal is to virtualize this and have LPARs running aix 7.1, 6.x, and Rhat for ppc ..
need some... (13 Replies)
hi
I am seeking to create a cgi-bin type creation that will allow users browsing the site to be able to run searches that would be a grep command or SED in the backround. I am not sure how to go about this, if you would give me a pointer or direction about what technology i could inform myself... (0 Replies)
Okay, so I'm not a complete newb when it comes to using Unix/Linux. I've been using Ubuntu for a few years now and I've dipped my toes into a few other distros but now I want to get a bit serious.
I'm looking at becoming a sysadmin but the trouble is...I have no idea where to start. What I'm... (1 Reply)
Hi guys I have a file that is filled with x,y values:
0.000000 0.00129578
0.000191 0.00272187
0.000381 0.0125676
0.000572 0.0120014
0.000763 0.00203461
0.000954 0.00682248
0.001144 0.00202773
0.001335 0.000840523
0.001526 0.00451419
....5MB of that
I wanted to know if there is a... (7 Replies)
Hey , I have become pretty normal, using unix and what not and working around FEDORA 9
I was wondering does anyone have any IDEAS or have anything I should try to build or scripts to write ,
or possibly know any sites where I could practice some things just so I know I am writing them... (2 Replies)
Say I have a single bin directory with Linux and SunOS executables, like this:
bin/myprog_lnx
bin/myprog_sun
Assume these programs read from stdin and write to stdout and, thus, are meant to be run like this:
myprog_lnx < filein > fileout
My users may log in from a Linux or Solaris... (3 Replies)
I'm a senior in high school trying to start getting into computer programming. All I've done so far is picked up a book on C for beginners and started to teach myself. There aren't really any courses at my high school for introductory programming, so it looks like I'll have to wait for college to... (7 Replies)
First, I just rebuilt/installed my custom kernel & I don't know how to check if it ran properly (I'm fairly sure it did, but I'm looking for reassurance that it loaded the new kernel file).
Second, I'd love to get into programming, scripting, whatever, I want my imagination to be the builder &... (2 Replies)