M
Matt Weyland
I have a DB. Its sole and only purpuse is to monitor
network connectivity and write the information to a
table. Not the best way to impliment but I work for the
Gov and am constrained by limited number of development
tools.
So far I have:
created a method to use the IMCP.dll methods to recreate
the funtion of PING
created a class to store informtion for each instance it
is created, i.e. IP, AppName, upTime ,and downTime amongst
others
For each instance of the class I want to do the following:
Mon - Fri 8-6 ping its respective IP, capture the result
and log in a DB. If the IP is up wait 5 minutes run
again, if the IP is down, wait 1 minute run again util the
IP is back up again.
My problem is in the waiting part. I tried using sapisleep
from kernel32 and pass in the ms to wait but this makes
the whole system sleep. My next thought was to use the
gettickcount also frm kernel32 and use that like a timer,
but that too would hog resources as it passes through the
loop for each iteration of the for next loop.
Does anyone have any ideas or suggestions.
Thanks
Matt Weyland
Database Analyst
please post responses here or reply to:
mweyland at mnqio dot sdps dot org
ps. MS nice to allow for annonymous emails. I was
getting 1500 pieces of SPAM a week because of this
newsgroup
network connectivity and write the information to a
table. Not the best way to impliment but I work for the
Gov and am constrained by limited number of development
tools.
So far I have:
created a method to use the IMCP.dll methods to recreate
the funtion of PING
created a class to store informtion for each instance it
is created, i.e. IP, AppName, upTime ,and downTime amongst
others
For each instance of the class I want to do the following:
Mon - Fri 8-6 ping its respective IP, capture the result
and log in a DB. If the IP is up wait 5 minutes run
again, if the IP is down, wait 1 minute run again util the
IP is back up again.
My problem is in the waiting part. I tried using sapisleep
from kernel32 and pass in the ms to wait but this makes
the whole system sleep. My next thought was to use the
gettickcount also frm kernel32 and use that like a timer,
but that too would hog resources as it passes through the
loop for each iteration of the for next loop.
Does anyone have any ideas or suggestions.
Thanks
Matt Weyland
Database Analyst
please post responses here or reply to:
mweyland at mnqio dot sdps dot org
ps. MS nice to allow for annonymous emails. I was
getting 1500 pieces of SPAM a week because of this
newsgroup