Wednesday, May 25, 2011

[Level 1] Linux simulator on web.

Petty cool stuff.
Linux simulator on web.
Please refer to the foll
http://bellard.org/jslinux

Wish this helps.
regards,
Stanley Huang

Friday, May 20, 2011

[Level 2] How to check the resource limitation of specific process in Ubuntu.

How to check the resource limitation of specific process in Ubuntu.
You can follow the below steps:
# ps -ef | grep nfsd4
root      1098     2  0 May13 ?        00:00:00 [nfsd4]
root     18674 18607  0 20:32 pts/15   00:00:00 grep --color=auto nfsd4
# cat /proc/1098/limits 
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            10485760             unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             47490                47490                processes 
Max open files            1024                 1024                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       47490                47490                signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
# 
Wish this helps.
 regards,
Stanley Huang

Tuesday, May 10, 2011

[Level 2] How to connect wireless ap by command in Ubuntu.

How to connect wireless ap by command in Ubuntu?
You can use two commands, 'iwlist', 'iwconfig'.
# iwlist --help
Usage: iwlist [interface] scanning [essid NNN] [last]
              [interface] frequency 
              [interface] channel 
              [interface] bitrate 
              [interface] rate 
              [interface] encryption 
              [interface] keys 
              [interface] power 
              [interface] txpower 
              [interface] retry 
              [interface] ap 
              [interface] accesspoints 
              [interface] peers 
              [interface] event 
              [interface] auth 
              [interface] wpakeys 
              [interface] genie 
              [interface] modulation 
# iwlist wlan0 scanning essid ap_name
# iwconfig --help
Usage: iwconfig [interface]
                interface essid {NNN|any|on|off}
                interface mode {managed|ad-hoc|master|...}
                interface freq N.NNN[k|M|G]
                interface channel N
                interface bit {N[k|M|G]|auto|fixed}
                interface rate {N[k|M|G]|auto|fixed}
                interface enc {NNNN-NNNN|off}
                interface key {NNNN-NNNN|off}
                interface power {period N|timeout N|saving N|off}
                interface nickname NNN
                interface nwid {NN|on|off}
                interface ap {N|off|auto}
                interface txpower {NmW|NdBm|off|auto}
                interface sens N
                interface retry {limit N|lifetime N}
                interface rts {N|auto|fixed|off}
                interface frag {N|auto|fixed|off}
                interface modulation {11g|11a|CCK|OFDMg|...}
                interface commit 
       Check man pages for more details.
# iwconfig wlan0 essid ap_name
# iwconfig wlan0 enc passphrase
# dhclient wlan0
Wish this helps. regards, Stanley Huang