Hi All,
I am trying to run top in crontab, but I am getting problem while trying to redirecting the output of top cmd.
I am getting the process part but the CPU states, user, kernel, iowait, swap part is not showing.
While trying top > some_file_name the output i'm getting,
top: cannot open /dev/kmem
kvm_open: Permission denied
Is that the problem or there is any other way i can get that data directed as well.
Doesn't looks like a permission issue, because when i run it from the cmd prompt, it is apperaring fine. Problem is occuring only in case of redirecing.
Doesn't looks like a permission issue, because when i run it from the cmd prompt, it is apperaring fine. Problem is occuring only in case of redirecing.
Actually it does look like a permission problem. What happens when you do this:
I'm guessing /tmp/top_errors contains:
top: cannot open /dev/kmem
kvm_open: Permission denied
No need to worry about that, top has other ways of getting the information it needs, but if you really want to grab that as well
Hi AM Using Unix Aix
Used
${CMD} 2> ${ERR}
Dont get what above statement works .
SCRIPT=`basename $0`
ERR=$PWD/$SCRIPT.err
DATE=`date +"%d/%m/%Y"`
CMD=2
${CMD} 2> ${ERR}
if
then
echo "SUCCESS"
else
echo "FAILURE"
fi (1 Reply)
I am trying to create the file and redirect the output in the same command line which is line 4 in the below program.
#!/bin/bash
read -p "Enter File Name:" value1
echo "Your File Name is $value1"
sed 's/abcd/'$value1'/g' abcd_calls > $value1_calls
This is the error it generates
... (3 Replies)
Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold
I use top on other... (5 Replies)
Hi
I'm trying to do something on the bash command line that I will later put into a bash shell script.
I'm trying to take a program that reads stdin (using getline) and be able to keep it running in the background and fire "commands" to it. So what I thought I should do was to try taking... (3 Replies)
Dear All
I need to redirect requests coming in on a second domain, to a page within an existing web site.
So basicly
http:\\webtest should be redirected to http:\\ustnd5\ukt\newsroom\newsroom.jsp
I have the line
ProxyPassReverse /ukt/newsroom/newsroom.jsp http://webtest:10080/
... (1 Reply)
I in no means consider myself a expert in unix however my question is a little more complex. I am running a mac os 10 server and all web settings and email settings have been set up using the unix terminal. I am in the process or redirecting my mxrecords to a spam filtering company but i am... (11 Replies)
I've been trying to install Top on our Solaris box but it's giving me some trouble.
The uname -a command shows
SunOS servername 5.9 Generic sun4u sparc SUNW,Ultra-250
I downloaded Top form www.unixtop.com.
On the initial install I got errors because I didn't have a C compiler installed.... (2 Replies)
How to redirect the contents of a file to a command?
The contents of the file are the arguments necessary for the command.
thx in advance.
bye
svh (5 Replies)
how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number.
top -n 20
i want to save this output to a file... (1 Reply)