Changes between Initial Version and Version 1 of Internal/LinuxInterface


Ignore:
Timestamp:
Jan 4, 2008, 12:36:01 AM (17 years ago)
Author:
Joseph F. Miklojcik III
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/LinuxInterface

    v1 v1  
     1The Little ORBIT Node Linux Interfacer:
     2
     3|| How do I get a list of all wireless devices on a node? || {{{find /sys -name wireless -print}}} ||
     4|| How do I determine the bus of the wireless device with interface named foo0? || {{{ls -l /sys/class/net/foo0/device/bus | sed -e 's#^.*/\([^/]*\)$#\1#' }}} ||
     5|| How do I get the vendor id of a wireless PCI device with interface named foo0? || {{{cat /sys/class/net/foo0/device/vendor}}} ||
     6|| How do I get the device id of a wireless PCI device with interface named foo0? || {{{cat /sys/class/net/foo0/device/device}}} ||
     7|| How do I get the vendor and device id of a wireless USB device with interface named foo0? || {{{cat /sys/class/net/foo0/device/uevent | grep ^PRODUCT | sed -e '}}}<redacted>{{{'}}} ||
     8|| Why is the sed expression redacted? || To spare your sanity. ||
     9|| How do I get the MAC address of a wireless device with interface named foo0? || {{{cat /sys/class/net/foo0/address}}} ||
     10|| How do I in general query and manipulate the Linux kernel's IP layer? || With {{{ip}}} (hint: {{{-o -f inet}}}).  Not with {{{ifconfig}}}. ||
     11|| How do I cause a moo without harming a cow? || {{{ip moo}}} ||
     12|| If an interface is renamed with {{{ip link set foo0 name bar3}}}, will the above commands still work? || Yes, file names in {{{/sys}}} will change to match the new name, but you will have to re-examine {{{/sys/class/net}}} to pick up changes, and there is no good way to lock against changes from within the kernel.  Applications must negotiate changes between themselves. ||
     13|| How do I get a list of all hard disks on a node? || {{{find /sys/devices -name block:\*}}} ||
     14|| How do I determine the overall capacity of a hard drive XdaN? || {{{cat /sys/block/XdaN/size}}} ||
     15|| How do I determine how much physical memory is available? || {{{cat /proc/meminfo | grep MemTotal}}} ||
     16|| How do I retrieve the serial number of the motherboard? || {{{dmidecode -s baseboard-serial-number}}} ||
     17|| How do I get a list of all cpus on a node? || {{{ls -d /sys/devices/system/cpu/cpu*}}} ||
     18|| How do I determine the clock speed of a cpu? || {{{cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq}}} ||
     19|| Do the interface as described above work with any baseline image? || No.  Use 2007-12-09 or later. ||
     20|| Do we have reasonable assurances (!) that the interface as described above will last over the next several incarnations of the Linux wireless stack(s)? || Yes. (!) ||
     21|| Is there a tool equivalent to {{{ip}}} for wireless interfaces? || {{{iw}}} is not done yet, but when it is done, use it. ||
     22|| Can we replace a lot of that junk with a more general interface to {{{/sys}}}? || Yes, but the important thing is to note the 'contract' that certain files in {{{/sys}}} are sure to exist on baseline images in nodes. ||