[Web10g-user] Instrumentation frequency
rapier
rapier at psc.edu
Thu Sep 12 13:07:19 EDT 2013
So I took a few minutes... It doesn't have any error checking in it in
case usleep is out of bounds but for now this should do what you need:
-i is the interval in milliseconds.
--- ../../../web10g-userland-read-only/util/C/web10g-watchvars.c
2013-08-21 11:16:33.916865931 -0400
+++ web10g-watchvars.c 2013-09-12 13:04:50.215190026 -0400
@@ -45,6 +45,7 @@
estats_val_data* data = NULL;
int cid, i, j;
int opt, option;
+ int interval = 1000;
char *strmask = NULL;
const char delim = ',';
@@ -67,7 +68,7 @@
exit(EXIT_FAILURE);
}
- while ((opt = getopt(argc, argv, "hm:")) != -1) {
+ while ((opt = getopt(argc, argv, "hm:i:")) != -1) {
switch (opt) {
case 'h':
usage();
@@ -91,6 +92,9 @@
option = opt;
break;
+ case 'i':
+ interval = atoi(optarg);
+ break;
default:
exit(EXIT_FAILURE);
break;
@@ -152,7 +156,7 @@
}
}
- sleep(1);
+ usleep(interval * 1000);
printf("\n\n");
}
On 9/12/13 12:51 PM, rapier wrote:
> Arvind,
>
> Sorry to take so long to reply. The frequency is controlled by a simple
> sleep statement in the main loop. I'll look at changing that to a user
> defined parameter in the near future. However, if it's critical you
> could change the sleep(1) to usleep(500000) for half second intervals,
> etc. and recompile.
>
> I'm out all of next week and I'm working on an annual report right now.
> If I can get the time to get a patch file for a user defined sleep
> interval I'll post it here. Otherwise I'll get something out the
> following week.
>
>
>
> On 9/12/13 12:09 AM, Arvind Mahla wrote:
>> Hi Rapier
>>
>> Is there any breakthrough in increasing frequency of reporting of
>> variables from 1 second to a lower value
>>
>> Arvind
>>
>>
>>
>> On Tue, Sep 3, 2013 at 4:37 AM, Chris Rapier <rapier at psc.edu
>> <mailto:rapier at psc.edu>> wrote:
>>
>> I'll take a look at that tomorrow. One thing to keep in mind it's
>> that there will likely be some tradeoffs in terms of performance
>> when the granularity hits some point.
>>
>>
>> Sent with AquaMail for Android
>> http://www.aqua-mail.com
>>
>>
>> On September 2, 2013 1:51:38 PM Arvind Mahla __ wrote:
>>
>>> Hi,
>>>
>>> Can we increase the frequency of watchvars from once every second
>>> to once in some milliseconds.
>>>
>>> Arvind
>>
>>
> _______________________________________________
> Web10g-user mailing list
> Web10g-user at web10g.org
> https://lists.psc.edu/mailman/listinfo/web10g-user
>
> To UNSUBSCRIBE visit https://lists.psc.edu/mailman/unsubscribe/web10g-user
>
More information about the Web10g-user
mailing list