Dear Yuwei,

first of all: please make sure your mail client uses an English plaintext encoding. You currently declare to use Chinese GB2312 encoding, and the message body is encoded in Base64. This time I could make out what you were saying, but when I have top guess that you want to write
".c"
but my mail client shows
,io.ci+
I am not really inclined to answer. Also, the bits in Chinese below, I do not understand.


I want to know current time of the snmpd agent at any moment. Is there a mib like sysUpTime.0 to let me know.

Not to my knowledge. What are you trying to achieve? For time synchronization, I would recommend NTP or SNTP, not SNMP.


  Or I have an idea is. I want to write two file ,.c and .h, to compile 
in the agent. The problem I met is how can I let the code:
CurrentTime=time(NULL);
Executed every second. Which function should I use?

In the notification.c:
Snmp_alarm_registration(30,SA_REPEAT,**,**);
Let the trap to be send every 30 seconds. I want to know which function should I use to make the above code executed every 1 second.

Please be exact. The call as shown in the example code is

    snmp_alarm_register(30,     /* seconds */
                        SA_REPEAT,      /* repeat (every 30 seconds). */
                        send_example_notification,      /* our callback */
                        NULL    /* no callback data needed */
        );

In the C language, upper/lower case is important and you're wasting everybody's time by rewriting example code, wrongly.

Have you tried changing the '30' to '1'? Have you tried compiling the example? Have you read the documentation?

NHS^隊X'u%y*Zqylfz^~*yׯzZ)zxIz+%y*Zqylmi(ܢov'wjYhr'׭֊rX׭yǫf)+-5ljn+-.ǟOzǞYh)२rz܅zaz)*'m>b,y+޷b?+-wwyǫ

I've got no clue what your asking here, I do not speak Chinese.

Cheers,

                                -- Bert

--
Bert Driehuis -- [EMAIL PROTECTED] -- +31-20-3116119
If the only tool you've got is an axe, every problem looks like fun!

Reply via email to