Save value from output of Corestat and save in a list for each core
I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below:
Now I would like to save the "%Total" of each "CoreId" if it goes over (for example) 5. I need to put it in a list, and if the list size becomes 4, then I want to perform something. So far I am able to write the data only for the last core and it is not saving in the list, rather it is everytime just giving me the last number.
Here is the "Corestat_v1.1" code:
So, the code is running continuously. I am adding the list in the &print_stats() sub-function:
and the output I am getting is:
Notice the "size: " is always 1. :-(
I think I am making some basic mistake in the concept.
Hi ,
i want to save the output of my c ++ code to a text file which is in a particular path :
this is part of my code and I dunno where I am doing it wrong
do
{
for( int i = 0; i < l; ++i )
{
std::cout << 1 + k * i + index << ' ';
}
... (2 Replies)
I'm using the following script to check cisco router health and I'd like to save output to a file,
vty_runcmd.sh > /check/check-cisco-health
script works and output is saved to a file. However using it in crontab file is created but output is not printed inside it. In crontab,
*/5 * * * *... (4 Replies)
i want to save the output of /scripts/whoowns domain.com to a username
like $user = /scripts/whoowns domain.com
but I'm not sure how to do that
This is inside a bash script
how can I get the output of /scripts/whoowns
then save that to a variable?
thanks!
---------- Post updated at... (0 Replies)
I make shell script by use "if" statement, what should add it to
shell script save which I enter it in output file txt?
---------- Post updated at 08:27 AM ---------- Previous update was at 05:59 AM ----------
I mean
like this
echo "enter your name"
read name
# now i when start... (1 Reply)
Hi,
in shell script, i have the command swstart -p which returns an output. i want to store the output of this command into a variable. how i can do that
excerpt from the script
#!/usr/bin/ksh
#
#
#
# Program: swstart -p
#
# Description: Starts the sentinels on Slave server
... (4 Replies)
Hi,
I have a 3rd party tool on Solaris 8. I am running it thorugh my script but I am not able to capture its output into a variable.
Like, I tried, but did not work.
output=`/usr/bin/myTool`
echo $output
Also, I tried saving in a file but when I run, output is always shown on the... (19 Replies)
hi there !
i have exactly the same problem like this guy here
https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html
i am not able to save the curl verbose output..
the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
hi
i have server monitor script which totally depends upon the output of TOP which works fine on HP.
now i am told to put same script on aix i found that topas -P produces same output but it doesnt redirect output to file i have to kill/terminate it. is there any other way to this.
as the... (0 Replies)
Hello Friend,
In TCL i wrote a procedure as power, accepting two arguments and it was saved as a file named TCLProc.tcl.
Now from unix, using shell script i want to run this procedure power,the output of this procedure should be saved in a text file.How can i do this.Please help me as early... (1 Reply)
I have a window open on my ultra 10 - a terminal window connecting to a server.
Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)