Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to know whether the fan of my laptop is on via software. I load fan.ko without complaint. That creates /sys/module/fan/ and /sys/bus/acpi/drivers/fan/ . /sys/module/fan/initstate contains the word 'live' - a good sign. But I can't find a file that contains the current state. fan.c tells me the fan is either on or off and that it would record this with a 1 or 0 in a file called state, but I can't find that file.
The only subdirectory in /proc/acpi is button; I think /proc/acpi has been deprecated.
I used to be able to do this on my old Thinkpads with some software written for them.
AFAIK lm-sensors is the package you need to monitor fans and temps etc. This link should help -->http://lm-sensors.org/wiki
I think lm-sensors is installed if you do a full install. To find out if its there you can as root run the command 'sensors-detect'. It will probe your system and let you know what is found. Once lm-sensors is configured ( with sensors-detect ) you can add plugins for various desktops and display fans, cpu temp, etc. I use xfce and have the fans displayed.
Note that lm-sensors does not support every piece of monitoring hardware out there, so it may not work based on hardware not found.
lm-sensors is installed. sensors-detect finds no sensors it can use. inxi tells me that. I suspect that the fan module loads but can't detect fan status.
lm-sensors is installed. sensors-detect finds no sensors it can use. inxi tells me that. I suspect that the fan module loads but can't detect fan status.
Just to see what options are available in inxi since you now have it installed.
Code:
inxi -h
Shows all the different command options that can be used. I am posting right now in Racy 5.2.2 Puppy Linux which is pretty limited in what can be installed as far as sensor modules go. I know I have fan sensors on this laptop but Puppy won't show rpm on fans but In AntiX I can.
Code:
sh-3.00# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +61.0 C (crit = +200.0 C)
temp2: +0.0 C (crit = +200.0 C)
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +58.0 C
Core0 Temp: +54.0 C
Core1 Temp: +61.0 C
Core1 Temp: +54.0 C
sh-3.00# inxi -z -F
System: Host: puppypc2751 Kernel: 3.0.7 i686 (32 bit)
Desktop: JWM sn-505 Distro: Racy Puppy Linux
Linux 3.0.7 [i686 arch]
Machine: System: Acer (portable) product: Aspire 5534 version: V1.10
Mobo: Acer model: Aspire 5534 version: V1.10 Bios: Acer version: V1.10 date: 08/26/2009
CPU: Dual core (AMD Athlon X2 L310,1197.040,512 KB,fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv,2395.83,amd) (-MCP-) cache: unknown flags: (-)
Clock Speeds: 1: 1197.040 MHz 2: 1197.040 MHz
Graphics: Card: ATI RS780M/RS780MN [Radeon HD 3200 Graphics]
X.org: 1.11.0 drivers: ati,radeon (unloaded: vesa) tty size: 79x23 Advanced Data: N/A for root
Audio: Card: ATI SBx00 Azalia (Intel HDA) driver: HDA Intel Sound: ALSA ver: 1.0.24
Network: Card-1: Atheros AR928X Wireless Network Adapter (PCI-Express) driver: ath9k
IF: wlan0 state: up mac: <filter>
Card-2: Realtek RTL8111/8168B PCI Express Gigabit Ethernet controller driver: r8169
IF: eth0 state: down mac: <filter>
Drives: HDD Total Size: (254.1GB,1.3% used) () 1: id: /dev/sda model: TOSHIBA_MK2555GS size: 250.1GB
2: id: /dev/sdb model: SanDisk_Cruzer size: 4.1GB
Partition:
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: System Temperatures: cpu: 62.0C mobo: 0.0C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 80 Uptime: 1:15 Memory: 297.8/3796.1MB Client: Shell inxi: 1.8.5
sh-3.00# inxi --recommends
inxi will now begin checking for the programs it needs to operate. First a check of
the main languages and tools inxi uses. Python is only for debugging data collection.
-----------------------------------------------------------------------------------------
Bash version: 3.00.16(1)-release
Gawk version: 4.0.0
Sed version: 4.2.1
Sudo version: 1.8.1p1
Python version: 2.6.4
-----------------------------------------------------------------------------------------
Test One: Required System Directories.
If one of these system directories is missing, inxi cannot operate:
Required file system: /proc................................................. Present
Required file system: /sys.................................................. Present
All the required directories are present.
-----------------------------------------------------------------------------------------
Test Two: Required Core Applications.
If one of these applications is missing, inxi cannot operate:
Required application: df (info: partition data)............................. /bin/df
Required application: free (info: system memory)............................ /usr/bin/free
Required application: gawk (info: core tool)................................ /bin/gawk
Required application: grep (info: string search)............................ /bin/grep
Required application: lspci (info: hardware data)........................... /sbin/lspci
Required application: ps (info: process data)............................... /bin/ps
Required application: readlink.............................................. /bin/readlink
Required application: sed (info: string replace)............................ /bin/sed
Required application: tr (info: character replace).......................... /usr/bin/tr
Required application: uname (info: kernel data)............................. /bin/uname
Required application: uptime................................................ /usr/bin/uptime
Required application: wc (info: word character count)....................... /bin/wc
All the required applications are present.
-----------------------------------------------------------------------------------------
Test Three: Script Recommends for Graphics Features. If you do not use X these do not matter.
If one of these applications is missing, inxi will have incomplete output:
Recommended X application: glxinfo (info: -G glx info)...................... /usr/bin/glxinfo
Recommended X application: xdpyinfo (info: -G multi screen resolution)...... /usr/bin/xdpyinfo
Recommended X application: xprop (info: -S desktop data).................... /usr/bin/xprop
Recommended X application: xrandr (info: -G single screen resolution)....... /usr/bin/xrandr
All the recommended applications are present.
-----------------------------------------------------------------------------------------
Test Four: Script Recommends for Remaining Features.
If one of these applications is missing, inxi will have incomplete output:
Recommended application: file (info: -o unmounted file system).............. /usr/bin/file
Recommended application: hddtemp (info: -Dx show hdd temp).................. Missing
Recommended application: ifconfig (info: -i ip lan-deprecated).............. /sbin/ifconfig
Recommended application: ip (info: -i ip lan)............................... /bin/ip
Recommended application: sensors (info: -s sensors output).................. /usr/local/bin/sensors
Recommended application: lsusb (info: -A usb audio;-N usb networking)....... /usr/sbin/lsusb
Recommended application: modinfo (info: -Ax,-Nx module version)............. /sbin/modinfo
Recommended application: runlevel (info: -I runlevel)....................... /sbin/runlevel
Recommended application: sudo (info: -Dx hddtemp-user;-o file-user)......... /usr/bin/sudo
The following applications are missing from your system:
Application: hddtemp
To add to your system, install the proper distribution package for your system:
Debian/Ubuntu: hddtemp :: Arch Linux: hddtemp :: Redhat/Fedora/Suse: hddtemp
-----------------------------------------------------------------------------------------
Test Five: System Directories for Various Information.
If one of these directories is missing, inxi will have incomplete output:
System directory: /sys/class/dmi/id (info: -M system, motherboard, bios).... Present
System directory: /dev (info: -l,-u,-o,-p,-P,-D disk partition data)........ Present
System directory: /dev/disk/by-label (info: -l,-o,-p,-P partition labels)... Missing
System directory: /dev/disk/by-uuid (info: -u,-o,-p,-P partition uuid)...... Missing
The following directories are missing from your system:
Directory: /dev/disk/by-label
Directory: /dev/disk/by-uuid
These directories are created by the kernel, so don't worry if they are not present.
-----------------------------------------------------------------------------------------
All tests completed.
sh-3.00#
This is a recent install so like you. I still have some searching/configuring to do to get Puppy to read fan speeds.
So. I installed hddtemp from source since in Puppy Linux. Kinda like Slackware in that respect. But. No joy with fan speed either doing that. Just posting the info. I did make from inside hddtemp source folder. Also downloaded hddtemp.db (data base). Puppy runs as root so easy to compile that way in a sense.
sh-3.00# inxi --recommends
inxi will now begin checking for the programs it needs to operate. First a check of
the main languages and tools inxi uses. Python is only for debugging data collection.
-----------------------------------------------------------------------------------------
Bash version: 3.00.16(1)-release
Gawk version: 4.0.0
Sed version: 4.2.1
Sudo version: 1.8.1p1
Python version: 2.6.4
-----------------------------------------------------------------------------------------
Test One: Required System Directories.
If one of these system directories is missing, inxi cannot operate:
Required file system: /proc................................................. Present
Required file system: /sys.................................................. Present
All the required directories are present.
-----------------------------------------------------------------------------------------
Test Two: Required Core Applications.
If one of these applications is missing, inxi cannot operate:
Required application: df (info: partition data)............................. /bin/df
Required application: free (info: system memory)............................ /usr/bin/free
Required application: gawk (info: core tool)................................ /bin/gawk
Required application: grep (info: string search)............................ /bin/grep
Required application: lspci (info: hardware data)........................... /sbin/lspci
Required application: ps (info: process data)............................... /bin/ps
Required application: readlink.............................................. /bin/readlink
Required application: sed (info: string replace)............................ /bin/sed
Required application: tr (info: character replace).......................... /usr/bin/tr
Required application: uname (info: kernel data)............................. /bin/uname
Required application: uptime................................................ /usr/bin/uptime
Required application: wc (info: word character count)....................... /bin/wc
All the required applications are present.
-----------------------------------------------------------------------------------------
Test Three: Script Recommends for Graphics Features. If you do not use X these do not matter.
If one of these applications is missing, inxi will have incomplete output:
Recommended X application: glxinfo (info: -G glx info)...................... /usr/bin/glxinfo
Recommended X application: xdpyinfo (info: -G multi screen resolution)...... /usr/bin/xdpyinfo
Recommended X application: xprop (info: -S desktop data).................... /usr/bin/xprop
Recommended X application: xrandr (info: -G single screen resolution)....... /usr/bin/xrandr
All the recommended applications are present.
-----------------------------------------------------------------------------------------
Test Four: Script Recommends for Remaining Features.
If one of these applications is missing, inxi will have incomplete output:
Recommended application: file (info: -o unmounted file system).............. /usr/bin/file
Recommended application: hddtemp (info: -Dx show hdd temp).................. /usr/bin/hddtemp
Recommended application: ifconfig (info: -i ip lan-deprecated).............. /sbin/ifconfig
Recommended application: ip (info: -i ip lan)............................... /bin/ip
Recommended application: sensors (info: -s sensors output).................. /usr/local/bin/sensors
Recommended application: lsusb (info: -A usb audio;-N usb networking)....... /usr/sbin/lsusb
Recommended application: modinfo (info: -Ax,-Nx module version)............. /sbin/modinfo
Recommended application: runlevel (info: -I runlevel)....................... /sbin/runlevel
Recommended application: sudo (info: -Dx hddtemp-user;-o file-user)......... /usr/bin/sudo
All the recommended applications are present.
-----------------------------------------------------------------------------------------
Test Five: System Directories for Various Information.
If one of these directories is missing, inxi will have incomplete output:
System directory: /sys/class/dmi/id (info: -M system, motherboard, bios).... Present
System directory: /dev (info: -l,-u,-o,-p,-P,-D disk partition data)........ Present
System directory: /dev/disk/by-label (info: -l,-o,-p,-P partition labels)... Missing
System directory: /dev/disk/by-uuid (info: -u,-o,-p,-P partition uuid)...... Missing
The following directories are missing from your system:
Directory: /dev/disk/by-label
Directory: /dev/disk/by-uuid
These directories are created by the kernel, so don't worry if they are not present.
-----------------------------------------------------------------------------------------
All tests completed.
Funny thing is. In my previous post with sensors command all my temps showed OK. This was kinda a shot in the dark to see if hddtemp would help in seeing fan speeds in Puppy. So, Like you
Quote:
That creates /sys/module/fan/ and /sys/bus/acpi/drivers/fan/ . /sys/module/fan/initstate contains the word 'live' - a good sign.
I looked there in Puppy and saw the same as you, 'live'. This is a Acer Laptop 5534 dual core. Probably only has a chassis fan, no cpu fan like my desktop (temperature readouts reminded me to plug in the usb laptop cooler pad ) . So I still have some digging to do like you to see what else I can find.
inxi -h returns 117 lines of information. -s reports fan status, which returns N/A. I think I'm thinking about the chassis fan: it's the one I can see on the bottom rear of the case that I can feel blowing occasionally
/sys/devices/virtual/thermal has 4 directories cooling_device0/ cooling_device1/ cooling_device2/ thermal_zone0/ ; 0 and 1 are 'Processor' type; 2 is LCD type; the type of thermal_zone0 is 'acpitz' - whatever that means (acpi thermal zone?). The temp file in thermal_zone0 is the value the coretemp module returns. Perhaps one of the other files in thermalzone0 is the fan status.
Would you 2 kind persons do me the favor of telling me if you have either of these 2 files:
fan.c creates a device with ID PNP0C0B . I see that it never appears in any log file or in /sys/devices/LNXSYSTM:00 where PNP0C0? for lots of other digits appear. It appears my computer doesn't report its fan status.
It definitely works: when the temp reaches 55 degrees the fan comes on and the temperature drops.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.