IDependOn-Set: 1
IDependOn-Set: 2
IDependOn-Set: 304
IDependOn-Set: 34
IDependOn-Set: 7
IDependOn-Set: 89
LastModifiedSecs: 938136997
Parent: 34
SequenceNumber: 16
Title: How do I manipulate the JServ shared memory file?
Part: 0
Author-Set: mark@i-drive.com
LastModifiedSecs: 938136997
Type: html
Lines: 12
The shared memory file can be read easily from shell, perl, or C applications. One way to determine the current status of currently routed VMs would be with the UNIX strings command. Remove unwanted characters with sed. Use grep to grab the  pertinent lines. The result could be something like so:

<br><br>
strings /var/log/jserv_shm | sed -e 's/\$//g' -e 's/-$//' | grep -e '[-+/X]'
<br><br>
Here is a tool for manipulating the JServ shared memory file. This makes possible a  managed removal (or re-addition) of VM's from the load balancing list by updating the STATUS on the given VM from [+-/X] to whatever new state you wish. This makes for smoother live content updates when you are load balancing between many VMs (Refer to Jean-Luc Rochet's documentation for a better description of the single character states<a href="http://jserv.apache.org/jserv/howto.load-balancing.html#Internalstate - Admistration tasks"> here</a>).
<br><br>
<a href="http://www.idrive.com/mark/Jserv/shm-update.sh.txt">shm-update.sh</a>
<br><br>
And here is a less robust perl version:<br>
<a href="http://www.idrive.com/mark/Jserv/shm-update.pl.txt">shm-update.pl</a>
<br><br>
EndPart: 0
