01-14-2010
Extract header from top command output
hi,
I want to extract and save the cpu(s) information from top command output, but individual cpu statistics separately on a multi-processor machine.
In command line, top will show this statistics when we press the switch "1".
any ideas?
thanks,
meharo
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
i need in csh to extract only the Memory line from the out put of the top command how can it easily done (1 Reply)
Discussion started by: umen
1 Replies
2. Solaris
I need to capture the following data on an hourly basis through cronjob scheduling:-
1. load averages
2. Total no. of processes.
3. CPU state
4. Memory
5. Top 3 process details.
All the above information is available through the command 'top'. But here we need to automate the same and... (4 Replies)
Discussion started by: subharai
4 Replies
3. Shell Programming and Scripting
I have written shell script to send file as an attachemt of email and output of "top -o res" command as email body. it works fine if i execute manually from prompt but it does not send "top -o res" command output in email body when it is executed via crontab. Any suggestions. My script is below:... (5 Replies)
Discussion started by: needyourhelp10
5 Replies
4. HP-UX
Hello all,
I've been woking on Solaris and Linux (Red Hat) so far but now I've inherited an HP-UX system and having minor issues with syntax...Appreciate if you could help me out here..
1) I'm trying to sort the output of the top command in HP-UX 11.11 by pressing O (capital O) after typing... (2 Replies)
Discussion started by: luft
2 Replies
5. Shell Programming and Scripting
Is this a stupid code??
top > top.out &
sleep 2
kill %1
cat top.out
Thanks, (6 Replies)
Discussion started by: Shawn, Lee
6 Replies
6. UNIX for Advanced & Expert Users
Hi All,
In the output of TOP command in my unix system, i monitored that some process has utilization more than 100% even some process has 4000% utilisation.
Please help me understand how it is possible to show more than 100% utilization.
Please see the screenshot below:... (2 Replies)
Discussion started by: anand2308
2 Replies
7. HP-UX
Hi All,
I want generate HP-UX overall system performance report.
I tried executing top command and write that out put to file. but am not able to view the report in proper format.
I can see report like below in file but i can see properly in terminal.
Please suggest how can i get... (2 Replies)
Discussion started by: lravip123
2 Replies
8. Shell Programming and Scripting
need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values.
After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I am a beginner, I have currently Solaris 11 on a vmware machine. Whenever I type a command like 'ls' the screen scrolls to the end of the screen. I am unable to see the entire list of directories and files. I have tried ls |page command, but looking out for a better option. (3 Replies)
Discussion started by: farheenprasad
3 Replies
10. UNIX for Dummies Questions & Answers
Dear All,
I created a small script to get the CPU, GIS usage etc automatically. However when i run this script manually its working , but when i run through cronjob i am not getting any output.
Can anyone please help me on this. I am using SuseLinux.
Thank you in advance.
#!/bin/sh
{... (2 Replies)
Discussion started by: Nitin Kapoor
2 Replies
LEARN ABOUT NETBSD
cpu_need_resched
CPU_NEED_RESCHED(9) BSD Kernel Developer's Manual CPU_NEED_RESCHED(9)
NAME
cpu_need_resched -- context switch notification
SYNOPSIS
#include <sys/cpu.h>
void
cpu_need_resched(struct cpu_info *ci, int flags);
DESCRIPTION
The cpu_need_resched() function is the machine-independent interface for the scheduler to notify machine-dependent code that a context switch
from the current LWP, on the cpu ci, is required. This event may occur if a higher priority LWP appears on the run queue or if the current
LWP has exceeded its time slice.
If RESCHED_KPREEMPT flag is specified in flags and __HAVE_PREEMPTION C pre-processor macro is defined in <machine/intr.h>, machine-dependent
code should make a context switch happen as soon as possible even if the cpu is running the kernel code.
If RESCHED_IMMED flag is specified in flags, machine-dependent code should make a context switch happen as soon as possible. In that case,
for example, if ci is not the current processor, cpu_need_resched() typically issues an inter processor call to the processor to make it
notice the need of a context switch as soon as possible.
Typically, the cpu_need_resched() function will perform the following operations:
o Set a per-processor flag which is checked by userret(9) when returning to user-mode execution.
o Post an asynchronous software trap (AST).
o Send an inter processor interrupt to wake up cpu_idle(9).
SEE ALSO
sched_4bsd(9), userret(9)
BSD
July 31, 2010 BSD