Changed the access file to include this script and restart the STATsrv. command Test /etc/STATsrv/bin/LfreeSTAT.sh
Created an add-on-STAT: # ======================================================================= # Test: dim_STAT New STAT Description # ======================================================================= Test 11 0 Test Statistic(s) Test %i
let's start from the beginning: first of all let's fix your command printing free output..
1. you set a fixed timeout within your script, so it'll not print data on a requested interval :-) 2. you pipe the whole output to "awk" which is not flushing your data by default (to check it you may simply start: $ LfreeSTAT.sh | more
and you'll see that even within 1 minute there will be no output :-) and that's the main problem why you don't see any data :-)
will really print data every 10 sec. and as awk will be involved on each iteration the output will be flushed for sure :-)
then if you want to get a more in depth data about memory usage on your Linux system you may write a script getting data directly from "/ proc/meminfo"
> Changed the access file to include this script and restart the > STATsrv. > command Test /etc/STATsrv/bin/LfreeSTAT.sh
> Created an add-on-STAT: > # > ======================================================================= > # Test: dim_STAT New STAT Description > # > ======================================================================= > Test > 11 > 0 > Test Statistic(s) > Test %i
I spotted something in this thread and want to ask for clarifications:
Joey mentioned "Changed the access file to include this script and restart the STATsrv."
- Is this to update the STAT_LIST or is there another reason for restarting the STATsrv?
- How can a new add-on STAT like this LfreeSTAT.sh be added to an existing collect using the same collect ID? I am hoping to be able to add the new STAT without having to stop an active collect, recycle the ID then restart the collect with the new STAT. I want to avoid losing collected data (or having to save and restore).
1. you never need to stop STAT-service :-) except if you want to upgrade it to the newer version or simply want to suspend collects for a while, etc.
2. there is no "normal" way to add any new STAT into an already existing collect, as well you don't need to keep the same collect forever for every server - at any time you may stop an existing collect, and simply start a new one (with a new ID) including more or less stats according your needs :-)
But well, as everything is based on scripts too, you may always hack them to do what you want ;-) - every time when you're starting a new collect there is a restart script created automatically.. - it's called ".restart.{DBNAME}.{CollectID}" and you may find it generally under "/apps/client". You may edit the file corresponding to your DB and collect, and change the line containing the list of STATs and add or remove some of them - so on the next stop/restart you'll see more or less stats within your collect :-)
Rgds, -Dimitri
On 3/5/10, CapPlan <thomasnt...@verizon.net> wrote:
> I spotted something in this thread and want to ask for clarifications:
> Joey mentioned "Changed the access file to include this script and > restart the STATsrv."
> - Is this to update the STAT_LIST or is there another reason for > restarting the STATsrv?
> - How can a new add-on STAT like this LfreeSTAT.sh be added to an > existing collect using the same collect ID? I am hoping to be able to > add the new STAT without having to stop an active collect, recycle the > ID then restart the collect with the new STAT. I want to avoid losing > collected data (or having to save and restore).
> Thanks for your input, > Tom
> -- > You received this message because you are subscribed to the Google Groups > "dim_STAT" group. > To post to this group, send email to dimstat@googlegroups.com. > To unsubscribe from this group, send email to > dimstat+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/dimstat?hl=en.
I cannot call it "feature" - it's more likely a hack :-) as well you may hack many things in dim_STAT or do things in different manner, etc. For example, historically there are start and stop scripts which are created on every new collect, and you have an option to start the collect or just create these scripts (and I wanted already to remove it, but there are still some users who use these scripts and not starting collects via web interface :-))
But well, better you know how the tool is working - more confident you're (at least it's what I think) - so nothing hidden, just ask :-))
Rgds, -Dimitri
On Mar 5, 8:09 pm, CapPlan <thomasnt...@verizon.net> wrote:
I have still one more question. I made some changes in the Add-On STAT description manually(Just another name for 2 columns), then i deleted the one i was using and restored the changed Add-On. For new collect this is working fine, but the old collects i have made with the old Add-On seem to be lost? Is there a way to recover them or are they lost forever?
When you create a new Add-On stat, Dimstat create a table in the MySQL database to store your data. The list, type and name of columns is defined by your stat description.
When you create a new Add-On stat with the name of an old one, dimstat drop the old table and create the new one.
If you have not made a backup before, there is no way to get your old data back.
> I have still one more question. I made some changes in the Add-On STAT > description manually(Just another name for 2 columns), then i deleted > the one i was using and restored the changed Add-On. For new collect > this is working fine, but the old collects i have made with the old > Add-On seem to be lost? Is there a way to recover them or are they > lost forever?
> Kr,
> Joey
> -- > You received this message because you are subscribed to the Google Groups > "dim_STAT" group. > To post to this group, send email to dimstat@googlegroups.com. > To unsubscribe from this group, send email to > dimstat+unsubscribe@googlegroups.com<dimstat%2Bunsubscribe@googlegroups.com > > . > For more options, visit this group at > http://groups.google.com/group/dimstat?hl=en.
Thanks Alain - it's exactly how it works :-) Add-On is a high level operation, so every time you create a new Add-On it'll cleanup all information in the database corresponding to its name (and drop any corresponding tables too). And as you may see there is no "Modify" option in web interface - only Add New or Delete (and Restore is managed as Add New) - so you drop all Add-On data on every operation (except Save :-)).
Rgds, -Dimitri
On 3/9/10, Alain Chéreau <cheral...@googlemail.com> wrote:
> When you create a new Add-On stat, Dimstat create a table > in the MySQL database to store your data. > The list, type and name of columns is defined by your stat description.
> When you create a new Add-On stat with the name of an old one, > dimstat drop the old table and create the new one.
> If you have not made a backup before, there is no way to get your old data > back.
>> I have still one more question. I made some changes in the Add-On STAT >> description manually(Just another name for 2 columns), then i deleted >> the one i was using and restored the changed Add-On. For new collect >> this is working fine, but the old collects i have made with the old >> Add-On seem to be lost? Is there a way to recover them or are they >> lost forever?
>> Kr,
>> Joey
>> -- >> You received this message because you are subscribed to the Google Groups >> "dim_STAT" group. >> To post to this group, send email to dimstat@googlegroups.com. >> To unsubscribe from this group, send email to >> dimstat+unsubscribe@googlegroups.com<dimstat%2Bunsubscribe@googlegroups.com > >> . >> For more options, visit this group at >> http://groups.google.com/group/dimstat?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "dim_STAT" group. > To post to this group, send email to dimstat@googlegroups.com. > To unsubscribe from this group, send email to > dimstat+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/dimstat?hl=en.