PDA

View Full Version : Why?


Ciberputa
11-02-2004, 02:39
Look an this:


-jailshell-2.05b$ ps -A
PID TTY TIME CMD
1 ? 00:00:15 init
2 ? 00:00:00 keventd
3 ? 00:00:00 ksoftirqd_CPU0
4 ? 00:00:00 ksoftirqd_CPU1
5 ? 00:05:49 kswapd <defunct>
6 ? 00:00:02 bdflush
7 ? 00:01:28 kupdated
8 ? 00:12:47 kjournald
653 ? 00:00:00 kjournald
654 ? 00:01:07 kjournald
984 ? 00:02:19 syslogd
988 ? 00:00:01 klogd
2006 ? 00:00:02 xinetd
2129 ? 00:00:02 crond
2276 ? 00:21:41 java
2444 ? 00:00:00 rhnsd
2465 ? 00:00:00 portsentry
2597 ? 00:00:12 miniserv.pl
2601 tty2 00:00:00 mingetty
2602 tty3 00:00:00 mingetty
2603 tty4 00:00:00 mingetty
2604 tty5 00:00:00 mingetty
2605 tty6 00:00:00 mingetty
2767 ? 00:00:01 pure-ftpd
2774 ? 00:00:00 pure-authd
2895 tty1 00:00:00 mingetty
10451 ? 00:00:00 MailScanner
16459 ? 00:09:12 httpd
21857 ? 00:00:20 chkservd
28525 ? 00:01:29 mrtg
16431 ? 00:00:08 exim
16439 ? 00:00:00 exim
16443 ? 00:00:00 exim
16448 ? 00:01:16 antirelayd
16456 ? 00:00:09 spamd
30562 ? 00:00:02 sshd
30627 ? 00:00:00 mysqld_safe
21157 ? 00:20:27 mysqld
23284 ? 00:00:36 eximstats
23295 ? 00:00:04 cpaneld
23300 ? 00:00:03 webmaild
23305 ? 00:00:30 cppop
23309 ? 00:00:00 entropychat
23313 ? 00:00:00 melange
23339 ? 00:00:05 stunnel-4.04loc
23345 ? 00:00:00 whostmgrd
23350 ? 00:00:00 mailmanctl
23351 ? 00:00:56 python2
23352 ? 00:00:59 python2
23353 ? 00:00:54 python2
23354 ? 00:00:54 python2
23355 ? 00:00:54 python2
23356 ? 00:01:03 python2
23357 ? 00:01:06 python2
23358 ? 00:00:00 python2
24523 ? 00:00:00 webmaild
24527 ? 00:00:00 webmaild
19673 ? 00:00:32 named
5718 ? 02:27:09 httpd
19948 ? 00:00:05 MailScanner
22910 ? 00:00:03 MailScanner
23247 ? 00:00:00 sshd
23252 ? 00:00:00 sshd
23253 ? 00:00:00 bash
23283 ? 00:00:00 su
23285 ? 00:00:00 bash
27201 ? 00:00:59 httpd
27206 ? 00:00:58 httpd
27215 ? 00:01:02 httpd
27217 ? 00:01:02 httpd
27220 ? 00:00:59 httpd
27221 ? 00:00:58 httpd
27222 ? 00:01:03 httpd
27223 ? 00:00:56 httpd
27224 ? 00:00:59 httpd
27225 ? 00:00:57 httpd
27226 ? 00:00:52 httpd
27227 ? 00:00:56 httpd
27228 ? 00:00:59 httpd
27234 ? 00:00:54 httpd
1081 ? 00:00:02 MailScanner
1998 ? 00:00:02 MailScanner
6730 ? 00:00:00 pure-ftpd
6919 ? 00:00:01 MailScanner
7694 ? 00:00:04 httpd
8759 ? 00:00:01 httpd
8949 ? 00:00:00 httpd
8950 ? 00:00:00 httpd
8951 ? 00:00:00 httpd
9043 ? 00:00:00 email-queue1
9044 ? 00:00:00 check-email
9050 ? 00:01:05 grep
9051 ? 00:00:00 sshd
9094 ? 00:00:00 sshd
9095 ? 00:00:00 jailshell
9119 ? 00:00:00 bash
9147 ? 00:00:01 httpd
9157 ? 00:00:00 httpd
9158 ? 00:00:00 httpd
9159 ? 00:00:00 httpd
9160 ? 00:00:00 httpd
9162 ? 00:00:00 httpd
9164 ? 00:00:00 ps
-jailshell-2.05b$

as you can see, no server_linux PID. Ok, so, look an this:

-jailshell-2.05b$ ./teamspeak2-server_startscript stop
stopping the teamspeak2 server./teamspeak2-server_startscript: line 39: kill: (30697) - No such process
.................................................. ...................................

and now look at this:

-jailshell-2.05b$ ./teamspeak2-server_startscript start
tsserver2.pid already exists...server already started ?
-jailshell-2.05b$


So, why?, why it says that there is a server already started?.

Brain
11-02-2004, 09:10
Because!


How is anybody supposed to know what your teamspeak2-server_startscript does?
If you don't know what your own scripts do then shame on you.

Besides, just delete the file if there's no server running :D

Peter
11-02-2004, 14:58
Brain: Its the standard name for the startscript in b51, so we can assume he is using my startscript.

Well do what it says: Remove the .pid file if you are sure it is stopped (and stop the server next time using "./startscript stop" instead of killing it manualy...that way it will remove the pid, and will not complain that it thinks the server is still running next time.

Brain
11-02-2004, 17:07
Ah, good to know, thanks.

parpin
12-02-2004, 19:09
you can use /etc/init.d/teamspeak2-server zap