Jump to content

bithead

Member
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

bithead's Achievements

Conversation Starter

Conversation Starter (2/8)

0

Reputation

  1. Process Resource Monitor (PRM) is a great Linux script to help you monitor and manage out of control game services. You define a set of tolerable limits in a rule file for processes (by user or by process name) to monitor and take action on. To integrate PRM and TcAdmin, you must be careful to NOT kill the game service process, but to define a restart command in the rules file. This way, PRM will issue a restart of the service using TcAdmin. So, how do we do this? Add one file to the rules directory named tcagame.user (content follows). Here is what I use for the rules/tcagame.user file: # tcagame user monitor # # by - Don Pedersen Snaju.com # # send comments or suggestions to [email="don@snaju.com"]don@snaju.com[/email] IGNORE="" # Change the following to something appropriate for your hosting environment MAX_CPU="100" # Change the following to something appropriate for your hosting environment MAX_PROC="150" # we dont care about the process run time, set value 0 to disable check MAX_ETIME="0" KILL_TRIG="3" # we want to set a bit longer soft rechecks as sometimes the problem fixes # itself KILL_WAIT="20" KILL_PARENT="0" # Do not kill a tcadmin game service process, let tcadmin do it # So, we will send the game service a HUP asking for a restart # This works for games like minecraft. You may have to pick another # signal ( kill -l ) to pick something appropriate for your game service. KILL_SIG="1" # Let tcadmin restart the game service. This is graceful and the user # process will have a chance to save. KILL_RESTART_CMD="/home/tcadmin/Monitor/servicebrowser -service=`pwdx $pid | sed 's,.*/,,'` -command=restart" The guy that wrote PRM also has some incredible scripts, such as the APF firewall, Brute Force Detection, etc. Download PRM, run the install.sh script and add the rule file above to start monitoring and restarting tcadmin game services in a graceful manner. I also use PRM to monitor the mono processes of TcAdmin. TcAdmin has been fairly stable, but on occasion, it does run up the CPU and require a restart. PRM is perfect for such monitoring.
  2. Thanks for the suggestion. I'm always learning
  3. Here is a simple script to keep a max of 5 backups. I will leave it up to you on how to configure for a panel user to fire off the script. The goal is to tell tcadmin to stop the service, perform the backup and then restart the service. At snaju com we use this script to with our Centos-based servers. I have not tested with any other distros. The commands can be further simplified. For instance, tar can also zip - but I wanted to keep the isolated statements to show how this works. #!/bin/bash unalias rm SVCBR="/home/tcadmin/Monitor/servicebrowser" START=" -command=start" STOP=" -command=stop" SVCID=" -service=${Service_ServiceId}" BKUPDIR="./backup" # Steps to perform backup # 1. Stop MC Service eval "$SVCBR $STOP $SVCID" # 2. Compress World NOW=$(date +"%Y-%m-%d-%H-%M-%S") WRLDFILE="world_$NOW.tar" tar cf $WRLDFILE world gzip $WRLDFILE FILESIZE=$(stat -c%s "$WRLDFILE.gz") echo "world zipped = $FILESIZE" # 3. Copy to backup folder mkdir -p $BKUPDIR mv $WRLDFILE.gz $BKUPDIR/. # 4. Start MC Service eval "$SVCBR $START $SVCID" # Now clean up so we only keep the last 5 files ls -F $BKUPDIR/world_* | head -n -5 | xargs rm
  4. I thought I'd share this with everyone. Luis logged into our servers and solved the slave mono > 100% CPU issue Add this line to /home/tcadmin/Monitor/mono-config: export MONO_MANAGED_WATCHER=true This worked perfectly. Thanks a million Luis!
  5. Not a problem. I started working on a bash script to sift through the java processes and dump out the process id, the rss memory value and the command line. I figure I can use this as a starting point and from there try to incorporate it into something nicer for managing MC servers. Here is the link to the script: javaps.
  6. Thanks for the fast response! I added TCAdmin.Debug to TCAdminServiceManager.exe.config, restarted, and the excessive logging stopped. Now my 2 slave installations have mono running at 100% CPU and above. The master is running great. I will submit a ticket on this one. I don't see anything obvious.
  7. After updating to 2.0.36 yesterday, the TCAdminServiceManager.exe.log log is filling up rapidly with ">>>>". Is there a configuration setting I can set to turn logging off temporarily until this is resolved? Any help would be greatly appreciated!
  8. Is there a method to trigger a kill, or even an auto-restart for game processes that use too many resources? We often get minecraft servers that max the CPU and memory of the server. I need a way to automatically kill those troublesome processes.
  9. Thank you for the quick reply. I will give it a shot and post my results.
  10. Does anyone have a config for CounterStrike 1.6 non-steam protocol 47? Thanks in advance!
  11. Excellent! Thanks for the quick reply.
  12. I tried to apply a new theme and now my tcadmin 2 login panel doesn't show. I am experienced with CentOS 5 and MySql. Does anyone know how to restore to the default?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use