So I run a Minecraft server on/off on my friend's server box, using simply php/batch files uploaded through FTP.
The problem is, his whore ex-girlfriend is running 2 servers, so I can't simply taskkill the java process, as I used to do, when I need to turn off my server.
Is there a way to have the stop batch file determine which of the java processes is associated with my server, and kill only that one?
Actually, my friend handles it for her, she couldn't tell a batch file from a batch of cocks. (Actually she probably could, since the fat whore would most likely snarf down the latter)
>>1
Yes.
Make a connection to your minecraft server from your own IP, then run this.
netstat -anp|grep $your_ip_here
It will spit out a line something like this tcp 0 0 192.168.1.5:42616 209.85.169.104:80 ESTABLISHED2019/firefox-bin
It will say apache instead of firefox-bin, or whatever. The second IP address will be the one you connected from...anyway, the bit in bold is the PID you need to kill.
>>6
Nice elitism faggot, Windows has netstat too and it can print not only the process number but also a snapshot of the stack trace when socket() was called.
Needless to say your shitty solution would work on Mac OS X and most BSDs too. Anyway enjoy your Linux.
>>9 windows doesn't have grep
My GNU/NT distribution does.
Name:
!L33tUKZj5I2011-10-05 11:05
>>11
ACtually I'm on windows at the minute, as I've been doing a bit of gaming recently. I do have cygwin installed so so does mine. The lack of being able to fork shit is wank though, it's noticably slower at some tasks, and there isn't the ability to use screen
Name:
!L33tUKZj5I2011-10-05 11:06
I do still have dual boot though, and my netbook only ever has linux on it.
But damnit, if I run windows in a virtual machine, the latency on my midi keyboard is fucking through the roof, like over two seconds. It's unusable.
Name:
(Me == OP) !neAe92srE62011-10-05 13:59
Gotta love leaving a post on here overnight and coming back to the clusterfuck of herpderp.
Anyway..
My friend told me the server is Windows.
Name:
Anonymous2011-10-05 14:07
Is it possible for me to grab the process ID of the java exe when I run the server, so I can use it later?
All I have in my start batch file right now:
cd "C:\Program Files (x86)\EasyPHP1-8\www\minecraft\mc"
CALL minecraft_server.jar