Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    curl CPU loading and temp(s)?

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 473 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TheWaterbug
      last edited by TheWaterbug

      If I'm running a throughput/stress test on a pfsense box, is there a way to remotely pull the CPU utilization and temp(s), e.g. via curl or some other common command-line utility, from another box?

      1 Reply Last reply Reply Quote 0
      • T
        TheWaterbug
        last edited by

        Ok, I just found that BSD reports it via:

        sysctl -a | grep temperature
        

        But I can't figure out how to get to it via a single command. If I ssh into the box, I get the menu, and then I have to press 8 to get a shell, and then I can use the above command:

        ssh admin@192.168.0.1
        Password for admin@my.pfsense.box.name:
        pfSense - Netgate Device ID: <some.number>
        
        *** Welcome to pfSense 2.6.0-RELEASE (amd64) on pipfsense ***
        
         WAN (wan)       -> igc0       -> v4: my.public.ip.addr/28
         LAN (lan)       -> igc1       -> v4: 192.168.0.1/24
        
         0) Logout (SSH only)                  9) pfTop
         1) Assign Interfaces                 10) Filter Logs
         2) Set interface(s) IP address       11) Restart webConfigurator
         3) Reset webConfigurator password    12) PHP shell + pfSense tools
         4) Reset to factory defaults         13) Update from console
         5) Reboot system                     14) Disable Secure Shell (sshd)
         6) Halt system                       15) Restore recent configuration
         7) Ping host                         16) Restart PHP-FPM
         8) Shell
        
        Enter an option: 8
        
        [2.6.0-RELEASE][admin@ my.pfsense.box.name]/root: sysctl -a | grep temperature
        hw.acpi.thermal.tz0.temperature: 26.9C
        dev.cpu.3.temperature: 51.0C
        dev.cpu.2.temperature: 51.0C
        dev.cpu.1.temperature: 53.0C
        dev.cpu.0.temperature: 48.0C
        

        But how can I do that within a loop in a script (bash or ??) running on another box, without any user interaction?

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          You can execute commands directly using ssh if you have key based authentication setup. Like:

          steve@steve-NUC9i9QNX:~$ ssh root@apu "sysctl dev.amdtemp.0.core0.sensor0"
          dev.amdtemp.0.core0.sensor0: 54.1C
          

          You have to use root to avoid the menu.

          Steve

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.