LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2004, 01:06 AM   #1
har5ha
Member
 
Registered: Mar 2004
Location: NY
Distribution: Red Hat 9 [Kernel 2.6.6-1.435]
Posts: 72

Rep: Reputation: 15
Killing a process on startup......


HI,


there is a bug on my redhat 9 system [with the pam panel Icon process] ....

I need to kill the process on START UP....


is there way i can run a [ Shell Script ] on START UP to kill this proces????
 
Old 07-24-2004, 01:52 AM   #2
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Run

$ ps aux

And find what the process is, then add to your startup script

killall -9 <process name>

I.E.

if you wanted to kill your sshdaemon on startup (although there are far easier and cleaner ways of doing this), just add:

killall -9 sshd
 
Old 07-24-2004, 11:26 AM   #3
har5ha
Member
 
Registered: Mar 2004
Location: NY
Distribution: Red Hat 9 [Kernel 2.6.6-1.435]
Posts: 72

Original Poster
Rep: Reputation: 15
SBing

Thanks for ur input.........


i have a question ---> when u said add to your start up script
[

Run

$ ps aux

And find what the process is, then add to your startup script

]



Which startup script are you referring to?????


if i write a shell script which will grep on the process and try to kill it... how do i invoke this shell script every time i log on????
 
Old 07-24-2004, 12:52 PM   #4
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
I use

ps -ef

which list a detailed process list.

Then I use

kill -9 <ps number>

which forces kill that process. [I'm not familiar
with "killall", but it sounds like it may be better.]

One thing, process numbers change. You might have to
do fancy trick to find the process number using

ps -ef | grep <magic word>

and then use that number as a wildcard entry to

kill[all] -9 $1

I think .bashrc in your $HOME directory get automaticlly run,
but am NOT sure (Someone else correct me if wrong).

Sheng-Chieh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Killing a process fails. Have tried all I know. Racy Linux - Software 6 09-18-2005 12:57 PM
Process killing script owix Linux - General 2 07-19-2005 11:08 AM
Killing a process by its name rabeea Linux - Networking 3 03-17-2005 05:30 AM
help with killing all java process idandl Linux - Newbie 2 02-02-2004 05:32 AM
Really Killing a Process! lazlow69 Linux - Newbie 14 05-10-2003 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration