FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.