Re: restart without rebooting
Dave Sill([EMAIL PROTECTED])@2001.06.18 16:20:49 +: Chris Johnson [EMAIL PROTECTED] wrote: HUPing only makes qmail reread locals and virtualdomains. (And there is no process called qmail, so killall -HUP qmail won't do anything on any system.) Except possibly on Solaris: ..and AIX -- beware ;-) /k NAME killall - kill all active processes SYNOPSIS /usr/sbin/killall [ signal ] DESCRIPTION killall is used by shutdown(1M) to kill all active processes not directly related to the shutdown procedure. killall terminates all processes with open files so that the mounted file systems will be unbusied and can be unmounted. killall sends signal (see kill(1)) to the active processes. If no signal is specified, a default of 15 is used. The killall command can be run only by the super-user. (I haven't tried it to see what it does with unexpected options and an invalid signal name.) -Dave -- The life uncaffeinated is not worth living. --Michael Han KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.net/ karstenrohrbach.de -- alphangenn.net -- alphascene.org -- [EMAIL PROTECTED] GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE DF22 3340 4F4E 2964 BF46 PGP signature
Re: restart without rebooting
Virginia Chism([EMAIL PROTECTED])@2001.06.18 15:34:10 +: But I don't think BSDi knows the killall command. That is exactly correct. I was able to find the PID and restart the qmail-send. Thanks to all who responded. I am working on the Unix books, but find some of them are written in techno-shorthand. I need a dictionary to go along with them. if you are on a *BSD system, you might check out the basic documentation on the system for a quick start, too. man intro will do the trick. then continue digging through the man pages with the references in the SEE ALSO section... the learning curve for the man docs is slightly higher than most well-written unix books, but they give you a good start to familiarize yourself with the system and you have them always online on the box you are logged on. you won't have any version/parameter problems with several commands since the man pages are up to date with the installed operating system (well, they should be). /k -- Real Time, adj.: Here and now, as opposed to fake time, which only occurs there KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.net/ karstenrohrbach.de -- alphangenn.net -- alphascene.org -- [EMAIL PROTECTED] GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE DF22 3340 4F4E 2964 BF46 PGP signature
Re: restart without rebooting
* Dave Sill [EMAIL PROTECTED]: [...stuff concerning Solaris killall command] (I haven't tried it to see what it does with unexpected options and an invalid signal name.) It still kills everything, including init. I made this mistake when I was a Solaris newbie. My users were not pleased. -- Drew
Re: restart without rebooting
Virginia Chism [EMAIL PROTECTED] wrote: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Depends how you're starting qmail. If you're using svscan, which then spawns a supervise process for qmail-start (qmail-send), then the following will work: svc -d service_name svc -u service_name where service_name is the name of the service directory for qmail-send/qmail-start. If you're not using svscan, you'll need to find the PID of qmail, and send it a SIGTERM to tell it to exit cleanly. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: restart without rebooting
On Mon, Jun 18, 2001 at 01:24:23PM -0500, Virginia Chism wrote: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Whenever I make changes in qmail, I have had to resort to `shutdown -r now` thus rebooting the entire system. I don't like doing this. Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. HUPing only makes qmail reread locals and virtualdomains. (And there is no process called qmail, so killall -HUP qmail won't do anything on any system.) Some changes require you to restart qmail--not just HUP it--and some don't require any restart at all. Do you use svscan/supervise to start qmail? If so, all you need to do to restart qmail is svc -t /service/qmail (assuming your qmail service directory is called /service/qmail). To HUP it, use svc -h instead of svc -t. If you don't supervise qmail, you'll need to find qmail-send's pid, kill it, and rerun the script you started it with. If killall on your system is not of the variety that kills all running processes, you can killall qmail-send and then restart it. What you really need to do is to read a book on basic Unix administration. This question really has nothing to do with qmail at all. Chris PGP signature
Re: restart without rebooting
At 01:24 PM 6/18/01 -0500, you wrote: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Whenever I make changes in qmail, I have had to resort to `shutdown -r now` thus rebooting the entire system. I don't like doing this. If you have to ask a question like this, it makes me wonder why you are attempting to administrate a mail server. This is basic administration. ps -ax | grep qmail-sendyou'll see something like 17950 p0 I 0:00.03 qmail-send the first number is important. kill -HUP whatever the first number is IE: kill -HUP 17950 Now,qmail reloads its configuration files. Might I suggest you familiarize yourself with unix basics BEFORE trying to run a mail server? Might make it a little easier for you. Jeff Palmer [EMAIL PROTECTED]
Re: restart without rebooting
On my FreeBSD systems my qmail startup scripts are in /usr/local/sbin. you might look there or /usr/local/bin At 01:24 PM 6/18/2001 -0500, Virginia Chism wrote: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Whenever I make changes in qmail, I have had to resort to `shutdown -r now` thus rebooting the entire system. I don't like doing this. Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. Any suggestions? = Todd Grimes [EMAIL PROTECTED] Internet Systems Specialist [EMAIL PROTECTED] Bass Pro Outdoors Online, L.L.C.(417)873-4354
Re: restart without rebooting
Virginia Chism writes: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Whenever I make changes in qmail, I have had to resort to `shutdown -r now` thus rebooting the entire system. I don't like doing this. Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. Any suggestions? Yes. If you've installed qmail as per http://www.lifewithqmail.org, then you need only do this: svc -t /service/qmail-send If you haven't installed qmail as per LQW, it's never to late to reinstall. -- -russ nelson [EMAIL PROTECTED] http://russnelson.com Crynwr sells support for free software | PGPok | 521 Pleasant Valley Rd. | +1 315 268 1925 voice | #exclude windows.h Potsdam, NY 13676-3213 | +1 315 268 9201 FAX |
Re: restart without rebooting
On Mon, 18 Jun 2001, Virginia Chism wrote: I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart in any of the qmail directories. Whenever I make changes in qmail, I have had to resort to `shutdown -r now` thus rebooting the entire system. I don't like doing this. Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. That is not true, killall only kills the specified command with the specified signal. killall -HUP qmail-send should work. But i don't think BSDi knows the killall command. kill -HUP `ps auwx | grep qmail-send | grep -v grep | awk -F {'print $2'}` (all on 1 line) should also do it. Or maybe even (if you have bash) for PID in \ `ps auwx | grep qmail-send | grep -v grep | awk -F {'print $2'}`; do \ kill -HUP $PID; done (not on 1 line but don't miss the backslashes) Grtz, Arjen.
Re: restart without rebooting
One problem with stopping a large Qmail system is waiting for everything to actually end cleanly. qmail-remotes can take some time to get done. At the moment, my system is: 992894705.645395 status: local 78/250 remote 110/250 Those remotes can take a very long time to time out. (10-20 minutes maybe) I tried automating a qmail stop/start sequence and even with killing all the remotes to help speed things up, I still couldn't get it stable. (occasionally the queue process would get confused and think there were still a few local or remote processes and there were none to be found, or if the queue were particularly chubby, just cleaning up after all the remotes were gone would take 2-3 minutes) This would cause the restart section of the script to fail because the qmail-start thought qmail was still going. (which of course it wasn't) Anyway, the moral of the story is on little systems it's not problem, on large ones it can be diceier. Greg
Re: restart without rebooting
Chris Johnson [EMAIL PROTECTED] wrote: HUPing only makes qmail reread locals and virtualdomains. (And there is no process called qmail, so killall -HUP qmail won't do anything on any system.) Except possibly on Solaris: NAME killall - kill all active processes SYNOPSIS /usr/sbin/killall [ signal ] DESCRIPTION killall is used by shutdown(1M) to kill all active processes not directly related to the shutdown procedure. killall terminates all processes with open files so that the mounted file systems will be unbusied and can be unmounted. killall sends signal (see kill(1)) to the active processes. If no signal is specified, a default of 15 is used. The killall command can be run only by the super-user. (I haven't tried it to see what it does with unexpected options and an invalid signal name.) -Dave
RE: restart without rebooting
But I don't think BSDi knows the killall command. That is exactly correct. I was able to find the PID and restart the qmail-send. Thanks to all who responded. I am working on the Unix books, but find some of them are written in techno-shorthand. I need a dictionary to go along with them.
Re: restart without rebooting
On Mon, Jun 18, 2001 at 09:55:24PM +0200, [EMAIL PROTECTED] allegedly wrote: kill -HUP `ps auwx | grep qmail-send | grep -v grep | awk -F {'print $2'}` Or maybe even (if you have bash) for PID in \ `ps auwx | grep qmail-send | grep -v grep | awk -F {'print $2'}`; do \ kill -HUP $PID; done (not on 1 line but don't miss the backslashes) vs svc -d /service/qmail-send As Russ says, it's never too late to change over to supervise. Regards.
Re: restart without rebooting
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mon, 18 Jun 2001, Virginia Chism wrote: Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. That is not true, killall only kills the specified command with the specified signal. Be careful! killall on some systems (Solaris, notably) sends the signal to every running process, as the original someone warned her. killall is therefore not considered a portable way of doing anything in shell scripts. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: restart without rebooting
* [EMAIL PROTECTED] [EMAIL PROTECTED] [010618 16:37]: On Mon, 18 Jun 2001, Virginia Chism wrote: Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. That is not true, killall only kills the specified command with the specified signal. Sure about that? On *every* machine? It even says in the killall(1) man page: Be warned that typing killall name may not have the desired effect on non- Linux systems, especially when done by a privileged user. Ooh, how about the Solaris 2.6 killall(1M) man page? killall is used by shutdown(1M) to kill all active processes not directly related to the shutdown procedure. killall terminates all processes with open files so that the mounted file systems will be unbusied and can be unmounted. killall sends signal (see kill(1)) to the active processes. If no signal is specified, a default of 15 is used. So it's probably not a good idea... /pg -- Peter Green : Architekton Internet Services, LLC : [EMAIL PROTECTED] --- Avoid the Gates of Hell. Use Linux (Unknown source)
Re: restart without rebooting
Hi Virginia, I need to learn how to restart qmail on my BSDi system. I have not been able to locate a qmail-restart ... There is nothing of such a program, otherwise you have written a shellscript called qmail-restart. To start qmail you have to start such other programms like splogger, qmail-start, ... The best you kill all the processes you have started in the stop- part. To see what is started after the startingscript type ps aux|grep qmail The best tool for creating a system-start-stop-script is using webmin. Here you have a special site for creating such things. Regards, Ruprecht
Re: restart without rebooting
On Mon, Jun 18, 2001 at 09:55:24PM +0200, [EMAIL PROTECTED] wrote: That is not true, killall only kills the specified command with the specified signal. Bzzt! Wrong! Some *nixes have a killall command that kills all processes. See: http://www.doc.ic.ac.uk/csg/manuals/all-manual-pages/solaris/usr/man/man1m/killall.1m.html (pardon possible bad linewrap) There _is_ a reason people don't say 'use killall' in generic advice -- it does not necessarily do the same thing on all platforms. Sent to the list in case some poor soul on Solaris (or other platform, who knows?) actually used this advice -- Greg White
Re: restart without rebooting
[EMAIL PROTECTED] wrote: Someone told me to try 'killall -SIGHUP qmail', but someone else said this might kill everything running - that the machine would not read to the 'qmail' at the end of the line. That is not true, killall only kills the specified command with the specified signal. Oh yeah? Try using the killall command on Digital Unix OSF1 v4.0 and see what happens. It kills all processes for whatever user you are logged in as (try to image root). Mike
Re: restart without rebooting
Hi, Sent to the list in case some poor soul on Solaris (or other platform, who knows?) actually used this advice these too: HP-UX: http://devresource.hp.com/STK/man/11.00/killall_1m.html AIX: http://www.unet.univie.ac.at/aix/cmds/aixcmds3/killall.htm Tru64Unix: http://www.tru64unix.compaq.com/faqs/publications/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN8/0181.HTM So really beware of just executing killall -HUP qmail without consulting the man page of your particular Unix. claudio -- Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212 mailto:[EMAIL PROTECTED]http://www.claudio.ch
Re: restart without rebooting
On Mon, 18 Jun 2001, Greg White wrote: On Mon, Jun 18, 2001 at 09:55:24PM +0200, [EMAIL PROTECTED] wrote: That is not true, killall only kills the specified command with the specified signal. Bzzt! Wrong! Some *nixes have a killall command that kills all processes. See: [sNap] Sent to the list in case some poor soul on Solaris (or other platform, who knows?) actually used this advice Sorry for the assumtion I made. Seen all the replies it is clear now that killall has varying functions on different *nix flavors... Grtz, Arjen.