ArchLinux:Shell
From Wiki.cyring.fr
(Created page with "===== Bash script to read ASUS sensors ===== <br /> http://blog.cyring.fr/wp-content/uploads/2010/10/Sensors.png <br /><br /> <syntaxhighlight lang="bash"> $ nano ~/.bashrc </...") |
(→Bash script to read ASUS sensors) |
||
| Line 7: | Line 7: | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
<syntaxhighlight lang="bash" line start="1"> | <syntaxhighlight lang="bash" line start="1"> | ||
| + | export EDITOR=nano | ||
| + | |||
| + | alias p='ps -eo user:5,pid:6,pcpu:5,rss:7,nlwp:2,comm --sort +pcpu,+rss' | ||
| + | |||
function chipset () | function chipset () | ||
{ | { | ||
| + | local hwpath="/sys/class/hwmon/hwmon2" | ||
| + | |||
local Dev="all" | local Dev="all" | ||
case "${1}" in | case "${1}" in | ||
| Line 29: | Line 35: | ||
declare -i I=1 | declare -i I=1 | ||
| - | while [ -e | + | while [ -e ${hwpath}/${Dev}${I}_label ]; |
do | do | ||
| - | local Label=$(cat | + | local Label=$(cat ${hwpath}/${Dev}${I}_label) |
| - | local Input=$(cat | + | local Input=$(cat ${hwpath}/${Dev}${I}_input) |
| - | local Min=$(cat | + | local Min=$(cat ${hwpath}/${Dev}${I}_${Label1}) |
| - | local Max=$(cat | + | local Max=$(cat ${hwpath}/${Dev}${I}_${Label2}) |
local Padding="" | local Padding="" | ||