Search Results

Search: Posts Made By: sshark
5,606
Posted By sshark
Any hints on my last question... - To start the...
Any hints on my last question...
- To start the script on the next quarter hour
5,606
Posted By sshark
Here is a sample for mpstat for CPU3 in one of...
Here is a sample for mpstat for CPU3 in one of the blades

# mpstat -P 3 2
Linux 3.0.101-0.15.1.6550.0.PTF-default (SC-1) 11/10/16 _x86_64_

22:29:16 CPU %usr %nice %sys...
5,606
Posted By sshark
Yes, I do have at utility in my system. ...
Yes, I do have at utility in my system.

Sorry, did not understand whether you need the output of the script or the input to the script. i.e mpstat command output
5,606
Posted By sshark
RudiC - Not really. You have seen how good I am...
RudiC - Not really. You have seen how good I am in the scripting :)
Attempting this would be another big exercise. I will look at it once I finish this script

MadeInGermany - Thanks for the...
5,606
Posted By sshark
Thanks Don & RudiC I was able to modify the...
Thanks Don & RudiC

I was able to modify the script and able to get the desired behavior. Below is my new script

#!/bin/ksh93

typeset -A cpuusage
{ read -A HD
while read -A TMP
do...
5,606
Posted By sshark
Thanks Don, I am almost there. Now I am able to...
Thanks Don, I am almost there. Now I am able to feed the mpstat output.

You suggestion to second question is still not working as per the requirement.

Let me output the contents

Linux...
5,606
Posted By sshark
Hi Don, Now the script works with your...
Hi Don,

Now the script works with your recommended changes

I do have a question though. The script we have drafted feeds input from a file.

However how could I directly feed the output of...
5,606
Posted By sshark
Some improvement, but still fails with ksh93 ...
Some improvement, but still fails with ksh93

# more a.ksh
#!/bin/ksh93

typeset cpuusage
{ read
read
read -A HD
while read -A TMP
do for i in ${!HD[@]}
do...
5,606
Posted By sshark
Looks like my bash shell does not have support...
Looks like my bash shell does not have support for associative arrays ?


# more a.sh
#!/bin/bash

declare -A cpuusage
{ read
read
read -a HD
while read -a TMP
do for i in...
5,606
Posted By sshark
I am trying to use it in a shell script Post...
I am trying to use it in a shell script

Post processing is like a Performance Management File.

I sample CPU usage every 5mins, then average it for a 15min period. Store the stats into a file
...
5,606
Posted By sshark
Storing two dimensional array for postprocessing
Hi Community,

Would love to get some quick help on below requirement.

I am trying to process mpstat output from multiple blades of my server
I would like to assign this the output to an array...
2,176
Posted By sshark
Thanks again for persisting with my confusing...
Thanks again for persisting with my confusing comments :)

You latest code works, but again because of my poor description the results are not as exactly what I expected when I have multiple...
2,176
Posted By sshark
As I mentioned in my second comment, I cannot...
As I mentioned in my second comment, I cannot copy and paste the actual inputs in here as the forum complaints that there are too many icons.

I think, I might have confused with my modified output...
2,176
Posted By sshark
Expected output
Pls see attached text file

A line or a field shall only be comma (,) separated. White spaces, new lines shall not be considered as delimiters
2,176
Posted By sshark
Sample input
Attached text file shows how my input looks like (I could not copy here as it exceeds to many icon characters)

As you can see $2 has some spaces/new lines. And AWK does not parse the entire...
2,176
Posted By sshark
Need help with awk
Hi Experts,

I am trying to process a CSV file with awk.

One of the columns (fields) in CSV file is an XML (which contains white space and new lines)

When I print/extract this column ($2) for...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy