maybe this does the trick? #!/bin/sh until [ $(netstat -nrf inet | grep tun |grep ^default | wc -l | xargs) -gt 3000 ]; do echo "password" | sudo openconnect -b -u username --passwd-on-stdin server:port done "netstat -nrf inet | grep tun| grep ^default | wc -l | xargs" is used to get the number of tun devices that ^default(or ^0.0.0.0) is attached to... just a thought. Regards Justin He On Mon, Aug 31, 2015 at 5:01 PM, Valentin Sawadski <valentin at tado.com> wrote: > Hello Nikos, > > how did you test with 3000 connected clients? Is the code you used available? > > Best Regards, > Valentin > > -- > Valentin Sawadski > Founder & Embedded Software > > Tel.: +49 - (0) 89 - 716 77 86 - 15 > Fax: +49 - (0) 89 - 716 77 86 - 99 > Mobil: +49 - (0) 162 - 460 163 4 > > facebook.com/tado | twitter.com/tado | youtube.com/tado > www.tado.com | tado? GmbH | Lindwurmstr. 76 | 80337 Munich | Germany > Managing Directors: Christian Deilmann | Johannes Schwarz | Leopold v. Bismarck > Registered with the Commercial Register Munich as HRB 194769 B | > VAT-No: DE 280012558 > > _______________________________________________ > openconnect-devel mailing list > openconnect-devel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/openconnect-devel