Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

DeathAndTaxes

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About DeathAndTaxes

  • Rank
    Rookie
  1. DeathAndTaxes

    Dedicated linux server "segmentation fault"

    http://www.flashpoint1985.com/cgi-bin....t=35845 I link from there to forums.gentoo.org and describe what I did to get through some new segfaults. Basically, I tried adding -nomap to the command-line and it worked for me. There's a few good links in there to some other resources to use for searching out problems, etc.
  2. DeathAndTaxes

    Linux ofp segmentation fault

    I'm just going to link to a post I made on the gentoo forums: http://forums.gentoo.org/viewtopic.php?t=111488 The weirdest thing is if I specify one config file and it works, then I copy that config file to a different name, it doesn't work. This is reproduceable. These are just some keywords I want to pop up when someone does a search: ld-2.3.2.so ld-linux.so.2 -config= Segmentation fault segfault
  3. DeathAndTaxes

    Useful ofp linux server scripts and utilities

    I have a handy perl script I use to shut the server down. Basically, I run several different gameservers online and I rotate them out. However, nobody likes it very much when a server shuts down automatically (via a cronjob) when it's timeslot is up and people are in the server. So, to compensate, I built a perl script to query the server and only shut it down if it's unoccupied. If it is occupied, it will try every 5 minutes until it's unoccupied. Maybe someone can use the query part for other good uses (building a nice little webpage for your server, for instance). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #!/usr/bin/perl use Socket; $ofpserverstatus = "\\status\\"; $ip = $ARGV[0] || "12.34.56.78"; $port = $ARGV[1] || 2303; $paddr = sockaddr_in($port, inet_aton($ip)); $proto = getprotobyname("udp"); socket(SOCKET, PF_INET, SOCK_DGRAM, $proto) or die "socket: $!"; connect(SOCKET, $paddr) or die "connect: $!"; send(SOCKET, "$ofpserverstatus\n", 0); recv(SOCKET, $line, 65000,0); @lines = split "\n", $line; #print "$line\n"; @output = split /\\/, $lines[0]; #@pairs = split /\\/, $lines[0]; for($i=1; $i < scalar @pairs; $i+=2) { print "$pairs[$i]: $pairs[$i+1]\n"; }; $numplayers = @output[16]; #print "$numplayers\n"; sub decision { if ($numplayers == 0) { print "no players on server, terminating server\n"; system("killall ofp_server"); exit; } else { print "server populated with $numplayers players, waiting 5 minutes\n"; sleep(600); print "slept for 5 minutes\n"; &decision } } while (1) { exit if &decision; } There's a few commented out lines in there that were left in there as good examples of other stuff you can do. I copied much of this from some other guy's ofp server query script I saw online somewhere. Sorry for not-more-proper-credit-giving. :-(
×