Thursday, January 3, 2013
Check if system is 32bit or 64bit
Im always looking for cleaner ways to get the architecture of my running host for my scripts.
Here is some commands Ive come across.
arch
getconf LONG_BIT
and then the classic
uname -m
HTH
Brent
Here is some commands Ive come across.
arch
getconf LONG_BIT
and then the classic
uname -m
HTH
Brent
Tuesday, January 1, 2013
Sometimes you may want to know what the state of an Ethernet card is. But lets say you don't have root, to use tools like ethtool or mii-tool.
Heres a quick tip
grep '' /sys/class/net/eth0/*
/sys/class/net/eth0/address:00:1b:21:6a:85:d6
/sys/class/net/eth0/addr_len:6
/sys/class/net/eth0/broadcast:ff:ff:ff:ff:ff:ff
/sys/class/net/eth0/carrier:1
/sys/class/net/eth0/dev_id:0x0
/sys/class/net/eth0/dormant:0
/sys/class/net/eth0/duplex:full
/sys/class/net/eth0/features:0xba9
/sys/class/net/eth0/flags:0x1003
/sys/class/net/eth0/ifindex:2
/sys/class/net/eth0/iflink:2
/sys/class/net/eth0/link_mode:0
/sys/class/net/eth0/mtu:1500
/sys/class/net/eth0/operstate:up
/sys/class/net/eth0/speed:100
/sys/class/net/eth0/tx_queue_len:1000
/sys/class/net/eth0/type:1
/sys/class/net/eth0/uevent:INTERFACE=eth0
/sys/class/net/eth0/uevent:IFINDEX=2
HTH
Brent
Heres a quick tip
grep '' /sys/class/net/eth0/*
/sys/class/net/eth0/address:00:1b:21:6a:85:d6
/sys/class/net/eth0/addr_len:6
/sys/class/net/eth0/broadcast:ff:ff:ff:ff:ff:ff
/sys/class/net/eth0/carrier:1
/sys/class/net/eth0/dev_id:0x0
/sys/class/net/eth0/dormant:0
/sys/class/net/eth0/duplex:full
/sys/class/net/eth0/features:0xba9
/sys/class/net/eth0/flags:0x1003
/sys/class/net/eth0/ifindex:2
/sys/class/net/eth0/iflink:2
/sys/class/net/eth0/link_mode:0
/sys/class/net/eth0/mtu:1500
/sys/class/net/eth0/operstate:up
/sys/class/net/eth0/speed:100
/sys/class/net/eth0/tx_queue_len:1000
/sys/class/net/eth0/type:1
/sys/class/net/eth0/uevent:INTERFACE=eth0
/sys/class/net/eth0/uevent:IFINDEX=2
HTH
Brent
Subscribe to:
Posts (Atom)