From: Roland H. <ro...@gm...> - 2006-04-12 22:06:06
|
Hi! I have added 2 functions in plugin_imon.c. The first returns the amount of Bytes Up/Downloading from the connected imond in kb/mb. The second function returns the uptime from the connected imond in seconds or user-defined format. The uptime function uses 2 functions from plugin_uptime (itoa, struptime). At the moment I had declared these functions at the beginning of the plugin. But if the user compile without plugin_uptime it doesn't work anymore. Shall I put these function under different names into the plugin or is it better to put these functions into a .h-file? -- greets Roland |
From: Nico W. <Nic...@po...> - 2006-04-13 07:23:45
|
Hi Roland, > I have added 2 functions in plugin_imon.c. The first returns the > amount > of Bytes Up/Downloading from the connected imond in kb/mb. The second > function returns the uptime from the connected imond in seconds or > user-defined format. What is the different between your first new function and the allready existing mon::rates(channel,dir)? The same question for the second new one and imon(uptime)? So I do not see, what is really new. Bye, Nico |
From: Roland H. <ro...@gm...> - 2006-04-13 18:27:00
|
Hi Nico, >> I have added 2 functions in plugin_imon.c. The first returns the >> amount >> of Bytes Up/Downloading from the connected imond in kb/mb. The second >> function returns the uptime from the connected imond in seconds or >> user-defined format. > > What is the different between your first new function and the allready > existing mon::rates(channel,dir)? The same question for the second new What is the difference between rates and amount of bytes? unit rates : byte/second unit amount: byte I mean the result from the quantity command from imond. > one and imon(uptime)? So I do not see, what is really new. imond returns the uptime only in seconds, imon(uptime) returns only seconds. The user has to convert the result in the config to the format he prefer (e.g. 2 days 3h 30m 50s). How easy is this today? Is it easier to use: %d days %H:%M:%S ? -- greets Roland |
From: Nico W. <Nic...@po...> - 2006-04-15 12:41:23
|
Hi Roland, > What is the difference between rates and amount of bytes? Sorry - it seems that I've read your first mail too fast. I think it is a good idea to implement this feature ;-) >> one and imon(uptime)? So I do not see, what is really new. > > imond returns the uptime only in seconds, imon(uptime) returns only > seconds. The user has to convert the result in the config to the format > he prefer (e.g. 2 days 3h 30m 50s). How easy is this today? > Is it easier to use: %d days %H:%M:%S ? Perhaps it is a good idea to move this conversion feature to an own date-plugin (like the string plugin) in order to resolv the dependency problem with the uptime plugin. Bye, Nico |
From: Michael R. <re...@eu...> - 2006-04-17 08:30:16
|
Hi Roland, > I have added 2 functions in plugin_imon.c. The first returns the amount > of Bytes Up/Downloading from the connected imond in kb/mb. The second > function returns the uptime from the connected imond in seconds or > user-defined format. > > The uptime function uses 2 functions from plugin_uptime (itoa, > struptime). At the moment I had declared these functions at the > beginning of the plugin. But if the user compile without plugin_uptime > it doesn't work anymore. Shall I put these function under different > names into the plugin or is it better to put these functions into a > .h-file? I'm not sure how to resolve this. Sharing code between plugins is a bad idea, as you've correctly stated. Just send me a patch, I'l have a look at it and think about it. bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Roland H. <ro...@gm...> - 2006-04-17 20:37:41
|
Hi Michael, >> The uptime function uses 2 functions from plugin_uptime (itoa, >> struptime). At the moment I had declared these functions at the >> beginning of the plugin. But if the user compile without lugin_uptime >> it doesn't work anymore. Shall I put these function under different >> names into the plugin or is it better to put these functions into a >> .h-file? > > I'm not sure how to resolve this. Sharing code between plugins is a > bad idea, as you've correctly stated. > > Just send me a patch, I'l have a look at it and think about it. The patch is on the way. -- bye Roland |