Ad Widget

Collapse

Name of processor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gumis_148
    Member
    • Jan 2019
    • 52

    #1

    Name of processor

    How can I get information about the processor name from server, eg Intel Xeon?
  • Singularity
    Member
    • Aug 2020
    • 81

    #2
    Perhaps a simple system.run[cat /proc/cpuinfo]. And after that add a regular expression preprocessing( something like : model name[\s: ]+([-a-zA-Z0-9/(/).@ ]+) ).
    In order to use system.run, you need to have EnableRemoteCommands=1 in zabbix_agentd.conf file.
    If using zabbix v5 or above, add AllowKey=system.run[*] in zabbix_agentd.conf file and restart zabbix_agent.

    Output : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
    Last edited by Singularity; 25-03-2021, 10:23.

    Comment

    • gumis_148
      Member
      • Jan 2019
      • 52

      #3
      Originally posted by Singularity
      Perhaps a simple system.run[cat /proc/cpuinfo]. And after that add a regular expression preprocessing( something like : model name[\s: ]+([-a-zA-Z0-9/(/).@ ]+) ).
      In order to use system.run, you need to have EnableRemoteCommands=1 in zabbix_agentd.conf file.
      If using zabbix v5 or above, add AllowKey=system.run[*] in zabbix_agentd.conf file and restart zabbix_agent.

      Using the above Logic, I will get : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
      In Windows, this won't work. "cat" is only for Linux.
      Value "'cat' is not recognized as an internal or external command, operable program or batch file."

      Comment

      • Singularity
        Member
        • Aug 2020
        • 81

        #4
        In windows the command is systeminfo. And in the regular expression it will become something like : Processor[/(/)a-zA-Z\s: ]+([-a-zA-Z0-9/(/).@ ]+)

        Comment

        • gumis_148
          Member
          • Jan 2019
          • 52

          #5
          Originally posted by Singularity
          In windows the command is systeminfo. And in the regular expression it will become something like : Processor[/(/)a-zA-Z\s: ]+([-a-zA-Z0-9/(/).@ ]+)
          Yes, I used the command: system.run[wmic cpu get numberofcores].

          Thank you!

          Comment

          Working...