Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - venox

Pages: [1]
1
General Discussion / Re: Ventrillo or Teamspeak...
« on: August 27, 2005, 06:56:55 pm »
I've done some tests with Vent, TS, and Skype. Skype beat them all by a mile in clarity, speed, and usability. However, it runs into the same problem as Vent with groups, doesn't do them very well (at least with the free version, afaik).

Right, I believe the max groupchat is 5, 4 people, and the host.  Skype claims they will be working on support for more in future releases.  However, since it's a client hosting the calls, a 50 person chat is unlikely, unless you are on your own 100Mbps or something.

2
General Discussion / Re: Ventrillo or Teamspeak...
« on: August 27, 2005, 08:40:37 am »
The ventrilo server is free, up to 8 clients :/ which isn't enough... teamspeak is completely free as long as it's not used for business related things.

I personally like the quality of vent over teamspeak.

3
Unix / Linux Discussion / Re: Shell Script for Start/Stop Process
« on: August 24, 2005, 06:08:55 am »
You should take a look at some of the more modern process manipulation packages. Probably the best known package would be procps, the package that includes top.

Check out the man file for the command skill (pkill is essentially the same thing only with more formal parameters to eliminate any ambiguities). You can send signals to process by name, terminal, username, or PID. Example:
This would freeze the user on terminal pts/2:
Quote
# skill -STOP pts/2

 To wake him back up:
Quote

# skill -CONT pts/2

If you wanted to kill all of user tmp's bash processes:
Quote
# pkill -KILL -u tmp bash

Lots of people don't think to use pgrep to return a list of PIDs matching the process name. This will eliminate a step for you ;P
Quote
sh-3.00$ pgrep xmms
1600
1601
1602
1605
10422
10423


I use top all the time, but not any of this other stuff.  Thanks for the suggestion(s) :)  I'll make sure I take a gander at that stuff.

4
Haha, yeah.  I just remembered that function a few days ago when I was doing something with arrays.

Good to see ya venox! :)

Likewise :)

5
Unix / Linux Discussion / Re: Shell Script for Start/Stop Process
« on: August 23, 2005, 08:38:56 pm »
How is this different from "killall -9 <name>"? :)

The only difference is that using the "ps wuax" method is generic.  It is probably BETTER in a lot of cases to use killall -9, but sometimes I like to make sure all of the processes are found.  The above method shouldn't be used on things like.... apache or mysql.

For instance, Wine has "wineserver" and "wine".  If I want to kill wine, I use ps wuax | grep wine | awk '{system("kill -9 " $2)}'.  Instead of killing each individually.  It's me being lazy :)

Also, I use these scripts in one central location on the server, to start/stop services.  Rather than having to move about the server, I can start and stop all the services from my rc.d folder.

For services which offer their own start/stop method(s).  I just use their start/stop, but from this script.  Because, as I said, I put all of these in one folder on the machine.  It makes it a lot easier for me personally.

What happens if you're running a life critical application called "wineisyummy", which has nothing to do with the Wine that Is Not an Emulator?  You'll kill it!



Haha, that is true, but, I know what processes run on my machine.  So, I am very concious about what I grep for.  As I said above, depending on the processes, I'll use 1 of 3 things in the above shellscript.

1. ps wuax
2. killall -9
3. kill -HUP

I use all of the above.

6
Unix / Linux Discussion / Re: Shell Script for Start/Stop Process
« on: August 23, 2005, 08:29:36 pm »
How is this different from "killall -9 <name>"? :)

The only difference is that using the "ps wuax" method is generic.  It is probably BETTER in a lot of cases to use killall -9, but sometimes I like to make sure all of the processes are found.  The above method shouldn't be used on things like.... apache or mysql.

For instance, Wine has "wineserver" and "wine".  If I want to kill wine, I use ps wuax | grep wine | awk '{system("kill -9 " $2)}'.  Instead of killing each individually.  It's me being lazy :)

Also, I use these scripts in one central location on the server, to start/stop services.  Rather than having to move about the server, I can start and stop all the services from my rc.d folder.

For services which offer their own start/stop method(s).  I just use their start/stop, but from this script.  Because, as I said, I put all of these in one folder on the machine.  It makes it a lot easier for me personally.

7
Unix / Linux Discussion / Shell Script for Start/Stop Process
« on: August 23, 2005, 08:00:41 pm »
For a long time i used to start a process and then to kill the damn thing, id have to ps aux | grep process_name, then kill -9 PID.  It started to get pretty old after a while.. so... I wrote this little bit of shell script to start/stop services on my server(s).  I use it all over the place.

Code: [Select]

#!/bin/sh

# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
  /usr/local/bin/blah -FLAGS
# stop
elif [ "x$1" = "xstop" ]; then
ps wuax | grep PROCESS_NAME | awk '{system("kill -9 " $2)}'
fi


Usage:
1. create startstop.sh

2. chmod u+x startstop.sh

3. Change the "/usr/local/bin/blah -FLAGS" to whatever process you want to start.

4. Change the "PROCESS_NAME" to whatever the process name is.  Also, you want to make sure that your process does not spawn child processes.  If it does, add another line "ps wuax | grep PROCESS_NAME | awk '{system("kill -9 " $2)}'" for those child processes as well.

5. now you can ./startstop.sh start or ./startstop.sh stop

Fairly simple script, but it saves a lot of headache.

Also, I forgot to mention, this is a FORCED shutdown, NOT a friendly one.  So, be careful what you use it for.  It should not be used for large-scale processes like MySQL/Apache etc..

And as iago pointed out, sometimes instead of using the ps wuax method, killall -9 is better to use.  This is intended to kill generic processes, like, counterstrike servers and things of that nature.  Make certain that your PROCESS_NAME is not TOO! generic.

Also, if you want to restart a service, you can use

Code: [Select]
elif [ "x$1" = "xrestart" ]; then
kill -HUP PROCESS_NAME

8
Unix / Linux Discussion / Re: How should I download KDE?
« on: August 23, 2005, 07:39:07 pm »
On how fast a box? :p

It's 1.8Ghz on FreeBSD.

9
Rather than looping through the array.  Which, works just fine.  Using in_array() would be a bit faster.

Code: [Select]

if (in_array($ip, $iparray)) {
    die('You are banned!');
}


10
Unix / Linux Discussion / Re: Distributions?
« on: August 23, 2005, 07:22:54 pm »
FreeBSD.  Quite simple because it makes an excellent workspace and the ports system kicks serious ass :)

11
Unix / Linux Discussion / Re: How should I download KDE?
« on: August 23, 2005, 07:21:37 pm »
I don't mean to dig up an old thread, but... you better have a lot of patience if you are planning on compiling KDE rather than installing it from a package.  KDE takes literally around 46 hours to compile, with dependencies.

Soooo patience :)

Pages: [1]