<div dir="ltr">I've written a script that will review a log file and produce some metrics.  I want the state of the script to be persistent across reboots.  I'm leary of using /tmp, /var/tmp, or $XYMONTMP (which on our install is /tmp) because those locations are easy to hijack, and therefore not safe for anything with a predictable name.<div><br></div><div style>It sounds like, from the two responses I've gotten (thanks!), there is not an explicitly appropriate location for my use, but that $XYMONTMP and/or $XYMONCLIENTLOGS might be the best candidates, if just because they're the only writable locations in the install.</div><div style><br></div><div style>Thanks!</div></div><div class="gmail_extra"><br clear="all"><div><div><br></div>-- <div><b>Steve Coile<br></b>Senior Network and Systems Engineer, <a href="http://www.mcclatchyinteractive.com/" target="_blank">McClatchy Interactive</a><div><font size="1">Office: 919-861-1247 | Mobile: 919-622-5369 | Fax: 919-861-1300</font></div></div></div>
<br><div class="gmail_quote">On Tue, Sep 16, 2014 at 6:45 PM, J.C. Cleaver <span dir="ltr"><<a href="mailto:cleaver@terabithia.org" target="_blank">cleaver@terabithia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, September 16, 2014 11:45 am, Steve Coile wrote:<br>
> I've written a client extension script that wants to maintain state<br>
> between<br>
> runs, essentially to know where it left off after the last run.  Where is<br>
> the "proper" place to keep such state files?  On our install,<br>
> ~xymon/client/tmp is a symlink to /tmp, which seems like a bad choice.<br>
><br>
> --<br>
<br>
<br>
I think it really depends on your specific use-case, including how<br>
"resilient" the test needs to be against local problems, and whether the<br>
state needs to persist across a reboot. In addition, how it's been<br>
packaged plays a role.<br>
<br>
I tend to be a fan of client runtime-dependent files (such as the .msg<br>
file the standard client builds) on tmpfs -- typically /dev/shm on Linux.<br>
That ensures we can still report even if the silly Dell controller has<br>
dropped us into read-only mode. OTOH, that's a bad place for keeping track<br>
of a nightly-rotated-logfile state unless you're okay with losing state<br>
after a crash or reboot (and potentially getting alerted again).<br>
<br>
<br>
If it needs to be kept around, I'd suggest /var/tmp/ or /var/tmp/xymon/<br>
(if present. If neither is writable or easily derived, $XYMONCLIENTLOGS<br>
(potentially ~xymon/client/logs) is simple enough to use, and should be<br>
basically reliable.<br>
<br>
Regards,<br>
<br>
-jc<br>
<br>
<br>
</blockquote></div><br></div>