Using starutil with batch files

From StarOS Community Wiki
Revision as of 20:07, 1 December 2006 by DrLove73 (talk | contribs)
Jump to navigation Jump to search

You can have some kind of automatization for pulling out MAC listing from AP's. There is an *.bat file (for dos/windows) that pulls currently active MACs, and writes them in time encoded *.txt file. Then you make *.lnk, set it to run minimized, and have it activated by "Scheduled Tasks" every 10 minutes. Do it like that and for CBQ, Config Backup and Link states, with diferent time intervals. It looks something like this:

Code:

  envtime > vreme.bat
  CALL vreme.bat
  echo %DOM%.%MON%.%YEAR% %HOUR%:%MIN%
  echo %DOM%.%MON%.%YEAR% %HOUR%:%MIN% >>Associations\PL-Net-Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  echo Srbobran Wlan1
  echo Srbobran >>Associations\PL-Net-Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  echo Wlan1: >>Associations\PL-Net-Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  starutil 192.168.212.100 password -ai wlan1 -da >>Associations\PL-Net- Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  REM
  echo Srbobran Wpci1
  echo Wpci1: >>Associations\PL-Net-Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  starutil 192.168.212.100 password -ai wpci1 -da >>Associations\PL-Net-  Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt
  REM
  echo ________________________________________________________________________________      >>Associations\PL-Net-Associations-%YEAR%-%MON%-%DOM%-%HOUR%.%MIN%.txt

Report looks like this:

Code: 09.07.2006 22:45 Srbobran Wlan1:

    Client Name     MAC Address       IP Address        Q    S    N  R    Idle
 1 [Bilans        ] 00:4f:62:04:xx:xx 192.168.212.119  40  -37  -77 1      17s
   rx:       11089764 tx:        3832152  client-side:  0 -102 -102            
 2 [Sindi         ] 00:4f:62:04:xx:xx 192.168.212.116  32  -46  -78 5.5  1:51m
   rx:         742044 tx:         358025  client-side:  0 -102 -102            
 3 [PTC           ] 00:30:4f:1c:xx:xx 192.168.212.127  20  -53  -73 1      14s
   rx:        4252126 tx:        5347760  client-side:  0 -102 -102            
 4 [Babic Branis..] 00:4f:62:03:xx:xx 192.168.212.110  29  -50  -79 11      0s
   rx:      172176627 tx:        6521510  client-side:  0 -102 -102            
 5 [Cuzdi Marta   ] 00:4f:62:03:xx:xx 192.168.212.135  22  -56  -78 1      20s
   rx:       42667494 tx:       11332678  client-side:  0 -102 -102            
 6 [Underground   ] 00:4f:62:02:xx:xx 192.168.212.129  26  -53  -79 11      0s
   rx:       31698873 tx:       19061083  client-side:  0 -102 -102            
 7 [Bakos Robert  ] 00:4f:62:02:xx:xx 192.168.212.145  22  -57  -79 1       0s
   rx:      148452945 tx:       29567141  client-side:  0 -102 -102            
 8 [Radio Srbobran] 00:40:f4:ba:xx:xx 192.168.212.102  46  -33  -79 11      0s
   rx:      568787835 tx:      421959952  client-side:  0 -102 -102            
 9 [Gavanski Zoran] 00:4f:62:04:xx:xx 192.168.212.154  39  -39  -78 1   10:13m
   rx:      191650564 tx:        4896750  client-side:  0 -102 -102            
10 [Tosa Bajlagic ] 00:e0:98:c5:xx:xx 192.168.212.142  20  -56  -76 1       0s
   rx:        5010852 tx:        1294248  client-side:  0 -102 -102            
11 [Tot Karolj    ] 00:0f:ea:45:xx:xx 192.168.212.125  21  -57  -78 1    2:52m
   rx:       19946957 tx:         858275  client-side:  0 -102 -102            
12 [Halgato Laslo ] 00:4f:62:01:xx:xx 192.168.212.123  21  -57  -78 11   1:04m
   rx:         707332 tx:         185397  client-side:  0 -102 -102            
13 [Raskov Goran  ] 00:e0:98:c5:xx:xx 192.168.212.130  25  -53  -78 11      0s
   rx:       18172869 tx:        3141654  client-side:  0 -102 -102            
14 [Djemba i Sarac] 00:e0:98:c5:xx:xx 192.168.212.117  35  -44  -79 11      0s
   rx:        1962203 tx:         582508  client-side:  0 -102 -102            
15 [Plazacic M    ] 00:40:f4:ba:xx:xx 192.168.212.150  21  -48  -69 1    1:06m
   rx:              0 tx:          11961  client-side:  0 -102 -102            

Wpci1:

    Client Name     MAC Address       IP Address        Q    S    N  R    Idle
 1 [Vitamix       ] 00:0b:6b:4c:xx:xx 192.168.120.201   0   23    0 1       0s
   rx:      -60616528 tx:              0  client-side: 23   23    0            

________________________________________________________________________________

With it, you can even control if someone is changing their static IP.


Here is sample package for pulling info/backup of:

  CBQ,
  Associations,
  Link states,
  Sys Info,
  Configs.

Placed inside is small readme file with instructions.

Advanced version will be posted until January 2007