Visit Our UNIX and Linux User Community

Full Discussion: How to detect process
Top Forums Shell Programming and Scripting How to detect process Post 30225 by hassan2 on Friday 18th of October 2002 07:29:45 AM
Old 10-18-2002

ps -ef | grep (process name)

this will show you if the process is running

To kill the process issue

kill -9 (process id)
Test Your Knowledge in Computers #66
Difficulty: Medium
IT and cybersecurity risk management is based on the intersection of these three areas, criticality, vulnerability, and threat.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

xterm detect

i have this script that launches multiple xterm sessionon a CDE. i would like to test the xterm so that when i execute the script using an ordinary terminal it will detect that it will unable to launch the xterm and execute other script instead. i tried using trap and exit status. maybe i am... (2 Replies)
Discussion started by: inquirer
2 Replies

2. Shell Programming and Scripting

How to detect whethere the CD is R or RW

Hi all, I need to write a script to write data into cd. Am using cdrecord command. i need to implement the following if ( CD-RW) ( ?? How to find this ) cdrecord blank option else cdrecord with out blank option Now can you please help me to form this statement... (2 Replies)
Discussion started by: jisha
2 Replies

3. UNIX for Advanced & Expert Users

How to detect OS is SLES 10 or not

Hi, I would like to programmatically find if given OS is SLES 10 / RHEL 3/.RHEL 4/RHEL5 etc .. For this do we have any library call/sys call? Or should we use any sys. structure which would give me detailed info. Share me if you have any pointers. Thanks in advance - Krishna (1 Reply)
Discussion started by: krishnamurthig
1 Replies

4. Shell Programming and Scripting

Detect changes in a file

Hi all Just curious , is it possible to detect changes in a file and sent to email . For ex: demo.conf I would like to receive an email everytime a particular file(demo.conf) changes and the content added/removed and who did the change (userid). Is it possible. Thanks CK (4 Replies)
Discussion started by: coolkid
4 Replies

5. Shell Programming and Scripting

detect F5 is pressed

Hello friends, I want to write a shell script in bash shell . Working for the script is to detect any key pressed and disply on screen as "you have pressed: " For example if user pressed F5 then a messaged has to be displayed as "you have pressed F5. Thank you. (4 Replies)
Discussion started by: pradeepreddy
4 Replies

6. Shell Programming and Scripting

How to detect that foreground process is waiting for input?

Hi, I have to create a script (ksh or perl) that starts certain number of parallel jobs (another scripts), each of them runs as a foreground process in a separate session. Plus I start monitoring job that has to determine if any of those scripts is expecting input from operator, and switch to... (4 Replies)
Discussion started by: andyh80
4 Replies

7. Shell Programming and Scripting

Detect changes to crontab

Dear All, My server is running crontabs of 4 different users. I want to develop a script that whenever a particular change occurs in a crontab , it is detected and the particular change is noted into a file. Kindly let me know of suggestions on how it can be achieved. My algo would be: ... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

8. Shell Programming and Scripting

How to detect Hanged process in shell script?

I have to check daily 20 processes each day. The names are like Network1 Network2 Network3 ....... Network20. There is built in utility for doing this. Following is the command to check a single network process. check_process_status 1 If we want to check the status of Network2 then the... (6 Replies)
Discussion started by: Nakul_sh
6 Replies

9. Shell Programming and Scripting

Detect OS

whats the equivalent of detect OS in perl with an if then ? platform='uname' if ]; then alias ls='ls --color=auto' elif ]; then alias ls='ls -G' fi In perl I see perl -Mstrict -MEnglish -E 'say $OSNAME' or print "$^O" Please use CODE tags as required by... (1 Reply)
Discussion started by: nixguynj
1 Replies

10. UNIX for Beginners Questions & Answers

How to detect which process is run by what?

Hello, I am running under ubuntu 14.04 Very long time ago, I set a script ( to block ip addresses abusing my system which was not active. I have not touched the server over six months or more. Today, after restart the system, started running all of a sudden and keep submitting... (4 Replies)
Discussion started by: baris35
4 Replies
killall(1M)															       killall(1M)

killall - kill all active processes SYNOPSIS
is a procedure used by to kill all active processes not directly related to the shutdown procedure. is chiefly used to terminate all processes with open files so that the mounted file systems are no longer busy and can be unmounted. sends the specified signal to all user processes in the system, with the following exceptions: the process; all processes (including background processes) associated with the terminal from which was invoked; any process, if owned by any process, if owned by any process; any process; any process. obtains its process information from and therefore may not be able to perfectly identify which processes to signal (see ps(1)). If no signal is specified, a default of (kill) is used. is invoked automatically by The use of is recommended over using by itself (see shutdown(1M)). FILES
fuser(1M), kill(1), ps(1), shutdown(1M), signal(5). STANDARDS CONFORMANCE

Featured Tech Videos

All times are GMT -4. The time now is 05:17 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy