Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Top 5 cpu and Mem consuming process and files and suggestion for health check Post 303037079 by Varja on Monday 22nd of July 2019 11:57:21 PM
Old 07-23-2019
Top 5 cpu and Mem consuming process and files and suggestion for health check

I am middle of writing health check scripts, can you pls share commands on how I can get cpu and Mem of top consuming process info at the moment?

Also can u suggest ideas on what all I can look for as a part do health check on red hat Linux server?

I searched on site before posting, but surprisingly didn't find any.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help to write script to check the process health and automatically restart it

I am working on a project, which need to constantly watch the process, and check its status, if it was dead, it should be restart automatically. Please kindly refer me to URL which teach how to write this kind of script, or service. Thanks. (1 Reply)
Discussion started by: dragondad
1 Replies

2. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

3. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

4. Shell Programming and Scripting

Shell script to display top 5 process (per cpu consumption)

Hello, I have to create shell script being myself real novice in scripting... I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success. For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies

5. Shell Programming and Scripting

What is max MEM% in top command?

HI, When i use the top command in Linux I get the below values. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND What is the maximum MEM% that will occur. I got once 303% . Is it possible to get such a high value. Regards, Ahamed. (2 Replies)
Discussion started by: ahamed
2 Replies

6. Shell Programming and Scripting

Warning in Top 10 cpu consuming processes

I m using following command to find top 10 cpu consuming processes. However whenever i execute the command i get following warning. What can be done to avoid it? # ps -auxf | sort -nr -k 3 | head -10 Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ root ... (6 Replies)
Discussion started by: pinga123
6 Replies

7. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Emergency UNIX and Linux Support

Can top show more than 100% in %MEM?

Can the %MEM value for a process show more than 100% in top output?Is this ever possible? (5 Replies)
Discussion started by: proactiveaditya
5 Replies

9. Solaris

Physical and Free mem on TOP command

Hi, When I run the free command on solaris, I get the following: "Memory: 60G phys mem, 69G free mem" Q: how cna the free mem be higher then the physical mem?:confused: Amit (3 Replies)
Discussion started by: amitlib
3 Replies

10. UNIX for Beginners Questions & Answers

Compare 2 files with different keywords : use server health-check tool

I have two files to be compared to get the output of the differences. File1 has a lot more lists than File2. After searching a lot on this thread I'am unable to find the exact code that im willing to get. This will be used as 'pre-check'/post-check utility (health check Tool) to compare... (1 Reply)
Discussion started by: GeekyJimmy
1 Replies
SAM_OVERVIEW(8) 				    Corosync Cluster Engine Programmer's Manual 				   SAM_OVERVIEW(8)

NAME
sam_overview - Overview of the Simple Availability Manager OVERVIEW
The SAM library provide a tool to check the health of an application. The main purpose of SAM is to restart a local process when it fails to respond to a healthcheck request in a configured time interval. During sam_initialize(3), a duplicate copy of the process is created using the fork(3) system call. This duplicate process copy contains the logic for executing the SAM server. The SAM server is responsible for requesting healthchecks from the active process, and controlling the lifecycle of the active process when it fails. If the active process fails to respond to the healthcheck request sent by the SAM server, it will be sent a user configurable signal (default SIGTERM) to request shutdown of the application. After a configured time interval, the process will be forcibly killed by being sent a SIGKILL signal. Once the active process terminates, the SAM server will cre- ate a new active process. The Simple Availability Manager is meant to be used in conjunction with the cpg service. Used together, it is possible to restart a cpg process that fails healthchecking during operation. The main features of SAM include: o A configurable recovery policy. o A configurable time interval for health check operations. o A notification via signal before recovery action is taken. o A mechanism to indicate to the application the number of times an active process has been created by the SAM server. o Both application driven health checking and event driven health checking. Initializing SAM The SAM library is initialized by sam_initialize(3). sam_initalize(3) may only be called once per process. Calling it more then once has undefined results and is not recommended or tested. Setting warning callback User configurable signal (default SIGTERM) is sent to the application when a recovery action is planned. The application can use the sig- nal(3) system call to monitor for this signal. There are no special constraints on what SAM apis may be called in a warning callback. After time_interval expires, a SIGKILL signal is sent to the active process to force its termination. Registering the active process The active process is registered with SAM by calling sam_register(3). This function should only be called one time in a process. After a recovery action is taken, the new active process will begin execution at the next line of code in a user process after sam_register(3). Enabling event driven healthchecking Two types of healthchecking are available to the user. The first model is one where the user application healthchecks during its normal operation. It is never requested to healtcheck, and if the active process doesn't respond within the time interval, the process will be restarted. A more useful mechanism for healthchecking is event driven healthchecking. Because this model is directed by the SAM server, It isn't nec- essary to guess or add timers to the active process to signal a healthcheck operation is successful. To use event driven healthchecking, the sam_hc_callback_register(3) function should be executed. BUGS
SEE ALSO
sam_initialize(3), sam_finalize(3), sam_start(3), sam_stop(3), sam_register(3), sam_warn_signal_set(3), sam_hc_send(3), sam_hc_call- back_register(3) corosync Man Page 12/01/2009 SAM_OVERVIEW(8)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy