This information is kept in the stats archive file header and can be extracted using the following:
$ strings file.gfs | head
Example:
$ strings cacheserver.gfs | head Hongkong localhost :GemFire 6.6.4.3 #build 39140 as of 12/10/2012 14:46:33 PST Linux 2.6.18-274.el5 amd64 localhost ...On Unix/Linux systems, you can confirm the availability of the zone by looking in
/usr/share/zoneinfoExport the specified time zone to the shell and launch VSD:
$ export TZ=<time zone> vsd
Example, for Hong Kong, you would do:
$ export TZ=Asia/Hong_Kong vsd
Note- Some time zones have short names (e.g. EST, IST) that are not sufficiently unique, so it is generally better to use an equivalent "zoneinfo", region/city identifier.
Scripted Solution:
Below is a script that implements the above procedure. To use, save the script, changing the path of vsd
to fit your install, and change the permissions of the script to run it, i.e.:
$ chmod +x startVSD.sh $ ./startVSD.sh statfile.gfs ---- BEGIN SCRIPT ---- #!/bin/bash # setting TIMEZONE before launching overrides the automatic setting. if [ "$TIMEZONE" != "" ]; then export TZ=$TIMEZONE else export TZ=`strings "$@" | head -1` fi echo "Using time zone: $TZ" # use "exec" to start vsd in this same process rather than spawn a new one. exec Path_to_GemFire/tools/vsd/bin/vsd "$@" & ----- END SCRIPT -----
Environment
Pivotal GemFire all versions