Sponsored Content
Top Forums Shell Programming and Scripting How to check if the process is Hung? Post 302990354 by mohtashims on Wednesday 25th of January 2017 08:37:16 AM
Old 01-25-2017
Hammer & Screwdriver How to check if the process is Hung?

I wish to monitor if my Tomcat process if Running, Hung, or Shutdown.

I cannot use any third party monitoring tools so i decided to use one of these to test if the tomcat server is responding or not .

Code:
1. nslookup
2. telnet
3. ps

The reason I do not use wget / curl is because it will make the Tomcat log information in its log files which will disturb the purpose of our testing.

Which of these three is better, safer and convenient to use.

Also, let me know if you have any other suggestions.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Check the process

I want to find the pid ( by ps ) that has already run over 30 seconds , I know ps only show the minute/hour . eg. the start time of the below process are 15:19 / 15:20 , but I don't know the exact time ( in term of "second" ) it start to run ( I only know the hour and minute ) , if I want to... (2 Replies)
Discussion started by: ust
2 Replies

2. UNIX for Dummies Questions & Answers

Check the process

Except the command "top" , is there other function / tool is used to check the process status in the system like 1. what process are running ? 2. how the CPU are allocating ? 3. how many swap is using ? 4. " Thx. (1 Reply)
Discussion started by: ust
1 Replies

3. UNIX for Dummies Questions & Answers

SCO Openserver 5.0.7 Hung process problem

Hi guys I installed this new server with 5.0.7 openserver and i'm getting a lot of this process, if a stop and restart the printer spooler they go away but after a few minutes they appear again.This is how it looks like. root 372 615 0 - - 00:00:00 <defunct> root ... (0 Replies)
Discussion started by: josramon
0 Replies

4. Shell Programming and Scripting

Monitoring for a hung process

A coworker has a shell script that runs from a scheduler at the 3am. The shell script runs sqlplus passing in a sql statement, which generate a file. This is done 21 times for 21 different sql statements. Recently, one of the sqlplus processes got hung. Is there a way to monitor how long the... (2 Replies)
Discussion started by: prismtx
2 Replies

5. Shell Programming and Scripting

zombie processes and hung process termination

Is there a way I can run a command that will run in the kernel or in the memory and automatically kill certain scripts if they get to <defunct> processes, without having to be monitoring the server manually? I have a Perl script which runs for 20k members and normally does not have any problems,... (2 Replies)
Discussion started by: ukndoit
2 Replies

6. HP-UX

ssh session getting hung (smilar to hpux telnet session is getting hung after about 15 minutes)

Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies

7. Emergency UNIX and Linux Support

Check hung process and restart

Hi all I have networker running on a RHEL 5.7 and over time it hangs. So the solution backup team proposed is to check if the process is hung, to stop and start it. Unfortunately for me, the rc script only allows three commands, start, stop and status (no restart option) so I managed to set... (15 Replies)
Discussion started by: hedkandi
15 Replies

8. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

9. Red Hat

How to find the process which is caused system hung state?

when system is hung state due to swap, we will reboot it through ILO. i want to know which process caused system hung. (1 Reply)
Discussion started by: Naveen.6025
1 Replies

10. UNIX for Dummies Questions & Answers

View User Mode Call Stack of Hung Process

I have a multithreaded usermode program(actually a daemon) which is in hanged state. To debug it I tried attaching the process to gdb, but the gdb hangs. gstack also gets hanged. I peeped into the proc file system and saw the process to be in sleeping state. /proc/sysrq-trigger I guess... (1 Reply)
Discussion started by: rupeshkp728
1 Replies
dxshutdown(8)						      System Manager's Manual						     dxshutdown(8)

NAME
dxshutdown - Performs various types of automated system shutdown. SYNOPSIS
/usr/bin/X11/dxshutdown OPTIONS
The dxshutdown command accepts all of the standard X Toolkit command-line options, which are documented in the OPTIONS section of the X(1X) reference page. DESCRIPTION
The Shutdown Manager application, dxshutdown, provides the system administrator with a graphical user interface for running user-specified scripts at shutdown time in addition to performing the following types of automated system shutdown: Halt (and restart console mode) Reboot Single-user mode shutdown Message-only shutdown Dependencies: None. You do not need to configure anything prior to running Shutdown Manager. You must be root to run Shutdown Manager. Shutdown Manager also lets the system administrator display one or more warning messages prior to system shutdown. The dxshutdown command uses the Tru64 UNIX shutdown command as an API, passing command-line arguments as specified by application defaults and user inputs. The Shutdown Manager also provides the following features, which the shutdown command does not provide: Selection of a preshutdown script to be executed prior to system shutdown Easy cancellation for a shutdown while the timed countdown is in progress Maintenance of an error- and-script output log under /var/adm/sysman/dxshutdown.log Saving and restoring user-selected shutdown options over multiple invocations of the Shutdown Manager application For additional information about the graphical user interface, see the online help volume, which is available from the Help button in the main window of the Shutdown Manager application. To start dxshutdown from the graphical user interface: Click on the Application Manager icon on the CDE front panel. Double click on the System_Admin application group icon. Double click on the Daily Admin application group icon. Double click on the Shutdown Manager appli- cation icon. EXAMPLES
To start Shutdown Manager from the command line, enter: dxshutdown To open the Shutdown Manager help volume from the command line, enter the following command: /usr/dt/bin/dthelpview -h /usr/dt/appconfig/help/C/DXshutdown.sdl FILES
Shutdown Manager executable Shutdown Manager log file Shutdown Manager help volume Shutdown Manager resource file (for option settings) SEE ALSO
Commands: fasthalt(8), halt(8), rc0(8), reboot(8), rwalld(8), shutdown(8), sync(8), X(1X) dxshutdown(8)
All times are GMT -4. The time now is 05:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy