Please define gracefully.API closes login when you close connection gracefully.
What is use case for API?Use case for API is not to monitor, but to do other things as for monitoring you can use SNMP, for example the Dude
23:19:50.802868 IP 10.1.1.21.8728 > devel.54230: FP 375:412(37) ack 105 win 2896 <nop,nop,timestamp 579513 8197338>
23:19:50.802938 IP devel.54230 > 10.1.1.21.8728: . ack 413 win 108 <nop,nop,timestamp 8197340 579513>
23:19:56.160016 IP devel.54230 > 10.1.1.21.8728: F 105:105(0) ack 413 win 108 <nop,nop,timestamp 8198679 579513>
23:19:56.161746 IP 10.1.1.21.8728 > devel.4230: . ack 106 win 2896 <nop,nop,timestamp 580049 8198679>
Main.Connect=false;
Main.Connected=false;
Main.Connect=true;
def readStr(self, length):
ret = ''
while len(ret) < length:
s = self.sk.recv(length - len(ret))
if s == '': raise RuntimeError, "connection closed by remote end"
ret += s
return ret
I think it is the point. I don't send "/quit" to my router from the client. I close the connection. Just like the s.connect() in the python code, I have a Java version of s.close(). Immediate logout.But it's not the point.
I can't logout "grecefully" regardles of logout style.
Logout initiated from mt is useless just the same as initiated from client.
[admin@MikroTik] > user active print count-only
53407
[admin@MikroTik] >
This is one of the things that bothers me. How come you get this number that high and I'm stuck at around 150 with that "challenge error"? What it depends from?Code: Select all[admin@MikroTik] > user active print count-only 53407 [admin@MikroTik] >
If that is over a period of 122 days, that is an average of 437 logins every day.[admin@MikroTik] > user active print count-only
53407
[admin@MikroTik] >
In other words: We don't give a f.. , complain to God.there is a problem in RouterOS v4.x that API logins are not closed properly and stay listed in '/user active' there is nothing you or me can do with API client to disconnect/close/leave the router to make them go away.
I dont't want to be rude but... are You kidding me ?Code that fixed this problem in 5.0rc broke a lot of things and therefore cannot be safely back-ported to v4.x
Sweepping under the carpet ....on the bright side, active api logins that are hangin' there does not consume resources, at least 100K hanging logins consumed approximately same amount of RAM as no hanging users.