Added outbound size MIB
This commit is contained in:
parent
4d642c14ef
commit
a5d2a3d579
@ -264,7 +264,7 @@ int outstat()
|
||||
DIR *dp = NULL;
|
||||
struct dirent *de;
|
||||
struct stat sb;
|
||||
unsigned int ibnmask = 0, ifcmask = 0, itnmask = 0;
|
||||
unsigned int ibnmask = 0, ifcmask = 0, itnmask = 0, outsize = 0;
|
||||
nodelist_modem **tmpm;
|
||||
|
||||
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next)) {
|
||||
@ -682,6 +682,7 @@ int outstat()
|
||||
/*
|
||||
* Show callresult for this node.
|
||||
*/
|
||||
outsize += (unsigned int)tmp->size;
|
||||
fmt = calloc(81, sizeof(char));
|
||||
buf = calloc(81, sizeof(char));
|
||||
size_str_r(tmp->size, fmt);
|
||||
@ -717,6 +718,11 @@ int outstat()
|
||||
Syslog('c', "Removed semafore do_inet");
|
||||
}
|
||||
|
||||
/*
|
||||
* Update outbound size MIB
|
||||
*/
|
||||
mib_set_outsize(outsize);
|
||||
|
||||
/*
|
||||
* Log results
|
||||
*/
|
||||
|
@ -125,6 +125,8 @@ typedef struct {
|
||||
unsigned int tfilesmagic; /* MIB tosser files magics */
|
||||
unsigned int tfileshatched; /* MIB tosser files hatched */
|
||||
|
||||
unsigned int ooutsize; /* MIB outbound size */
|
||||
|
||||
unsigned int bsessions; /* MIB BBS sessions */
|
||||
unsigned int bminutes; /* MIB BBS minutes used */
|
||||
unsigned int bposted; /* MIB BBS msgs posted */
|
||||
@ -692,3 +694,12 @@ void mib_set_files(char *data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void mib_set_outsize(unsigned int size)
|
||||
{
|
||||
status.ooutsize = size;
|
||||
Syslog('m', "MIB outbound: %d", status.ooutsize);
|
||||
|
||||
status_write();
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ void mib_set_email(char *); /* MIB set email data */
|
||||
void mib_set_news(char *); /* MIB set news data */
|
||||
void mib_set_echo(char *); /* MIB set echomail data */
|
||||
void mib_set_files(char *); /* MIB set files data */
|
||||
void mib_set_outsize(unsigned int); /* MIB set outbound size */
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user