LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-16-2008, 12:40 AM   #1
dave247
Member
 
Registered: May 2004
Posts: 206

Rep: Reputation: 30
Question rsyslogd -- Signals and other stuff


Hey I have homework and Im trying real hard to be friends with Linux. I am trying! Im using Fedora 8

First I just want to say that it always seems like i cant get commands typed properly so that they work --even if i consult the man pages and do what they say.

In this situation, I am trying to restart the rsyslogd daemon because I have modified the rsyslog.conf file so that I can get lpr.debug messages. So how do I restart rsyslogd? I looked in the man pages and it says the signal is SIGHUP and I tried that but it doesnt work.

Here is what Ive tried and the results:

Code:
Command: SIGHUP rsyslogd
bash: SIGHUP: command not found

Command:  rsyslogd -SIGHUP
rsyslogd: invalid option -- S
usage: rsyslogd [-46AdhqQvw] [-l hostlist] [-m markinterval] [-n] [-p path]
 [-s domainlist] [-r[port]] [-tport[,max-sessions]] [-f conffile] [-i pidfile] [-x]

Command: SIGHUP
bash: SIGHUP: command not found

Command:  kill -SIGNAL 'cat /var/run/rsyslogd.pid' SIGHUP
bash: kill: SIGNAL: invalid signal specification
So i dont know what Im doing wrong. I love the man pages because they are always a quick answer, except I never use it right.

please help
 
Old 02-16-2008, 05:55 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by dave247
Hey I have homework
If you checked the LQ Rules you'd have seen LQ doesn't deal with homework. So if you have stuff you should learn by experimenting yourself then by asking for handouts you won't learn a thing. Running 'kill -l' gives you the signal names. Chop off the "SIG" part. Then
Code:
kill -HUP `cat /var/run/rsyslogd.pid`
 
Old 02-16-2008, 07:59 AM   #3
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
If you checked the LQ Rules you'd have seen LQ doesn't deal with homework. So if you have stuff you should learn by experimenting yourself then by asking for handouts you won't learn a thing. Running 'kill -l' gives you the signal names. Chop off the "SIG" part. Then
Code:
kill -HUP `cat /var/run/rsyslogd.pid`

Im not asking for handouts you retard. I had been sitting here working and reading like a monster but thins still werent working. I ask questions here all the time, some for homework, some not, either way I always learn something new from the answers which help me learn even more.

I think you just wanted to say that to feel cool or something.

btw, thanks for the help; I already tried the HUP thing but it seemed like it didnt work. Plus, how come the man pages say SIGHUP instead of HUP ?? It doesnt tell me how to type it in or im not reading it correctly.
 
Old 02-16-2008, 08:02 AM   #4
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
That doesnt seem to work either.
[root@localhost etc]# kill -HUP 'cat /var/run/rsyslogd.pid'
bash: kill: cat /var/run/rsyslogd.pid: arguments must be process or job IDs

what am I failing to understand?
 
Old 02-16-2008, 08:12 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Backticks vs single quotes? This notation should be easier to understand: 'kill -HUP $(cat /var/run/rsyslogd.pid)'
 
Old 02-16-2008, 08:47 AM   #6
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
Backticks vs single quotes? This notation should be easier to understand: 'kill -HUP $(cat /var/run/rsyslogd.pid)'
Yeah that worked. I just dont understand why the man page says SIGHUP. It doesnt say to do -HUP

Im new and still learning a lot of basic stuff.. sorry
 
Old 02-16-2008, 11:15 AM   #7
rgerhards
Member
 
Registered: Sep 2003
Distribution: Fedora/Debian
Posts: 50

Rep: Reputation: 15
Quote:
Originally Posted by dave247 View Post
Yeah that worked. I just dont understand why the man page says SIGHUP. It doesnt say to do -HUP
It's the same. kill -sighup should also work. I guess you were confused by the backticks. Can you confirm that

'kill -SIGHUP $(cat /var/run/rsyslogd.pid)'

works for you, too?

Rainer
 
Old 02-17-2008, 10:20 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by dave247 View Post
Im not asking for handouts you retard.
You are requested to mind your manners, not post homework questions and show proper respect for your fellow LQ members.
 
Old 02-18-2008, 09:13 AM   #9
dave247
Member
 
Registered: May 2004
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
You are requested to mind your manners, not post homework questions and show proper respect for your fellow LQ members.
Again, I was not asking for a direct handout on my homework. I was doing my homework and along the way I encountered a problem that prevented me from finishing my homework. All I asked was how to restart the rsyslogd because my commands werent working. I almost had it but of course the commands were all different than what I was told by the man pages and other research.

Its not like I was asking for someone to do my homework, and I thought that was clear enough. Next time I wont use the hot-word "homework" in order to avoid distractions from the topic.

Oh and sorry if I hurt that guys feelings. :'(
 
Old 02-18-2008, 02:23 PM   #10
rgerhards
Member
 
Registered: Sep 2003
Distribution: Fedora/Debian
Posts: 50

Rep: Reputation: 15
Hi,

I guess you have overlooked my question (2 posts before your reply). I'd really appreciate if you could answer it

Thanks,
Rainer
 
Old 02-18-2008, 06:44 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Signals are defined in the libs as SIG<name> eg SIGHUP.
however, when you wnat to manually send a signal to a process, you use the short versio ie sans 'SIG' eg

kill -HUP <pid>

where you substitute the process id for <pid>.
'kill' in fact just sends the requested signal (or TERM). See http://linux.die.net/man/1/kill
 
Old 02-19-2008, 01:37 AM   #12
rgerhards
Member
 
Registered: Sep 2003
Distribution: Fedora/Debian
Posts: 50

Rep: Reputation: 15
Quote:
Originally Posted by chrism01 View Post
Signals are defined in the libs as SIG<name> eg SIGHUP.
however, when you wnat to manually send a signal to a process, you use the short versio ie sans 'SIG' eg

kill -HUP <pid>

where you substitute the process id for <pid>.
'kill' in fact just sends the requested signal (or TERM). See http://linux.die.net/man/1/kill
aha, I knew that I always screw up the command line. For me -SIGHUP also worked (on Fedora 8). But -HUP seems to be the safe bet. Thanks for pointing out.

Rainer
 
Old 02-20-2008, 07:19 PM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
In fact they are symbolic names so you could use the number instead, but names are easier.
 
  


Reply



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
signals lamtab Programming 1 11-17-2007 11:51 AM
!!! about signals !!! b2na Programming 4 02-04-2005 12:34 AM
!! about signals !!! b2na General 1 01-03-2005 04:37 PM
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 04:37 PM
Signals Speek Programming 2 12-24-2004 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:36 PM.

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