<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Monitor CPU cores of a Linux machine in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546567#M91024</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for the late response, but my Linux machine already has Splunk AddOn for Unix installed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to monitor its cores (threads)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 19:19:29 GMT</pubDate>
    <dc:creator>hishamjan</dc:creator>
    <dc:date>2021-04-02T19:19:29Z</dc:date>
    <item>
      <title>Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546329#M90997</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Linux machine running on Centos 6.10 with a quad-core processor&amp;nbsp; (16 threads)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hishamjan_0-1617256707290.png" style="width: 648px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13567iA4EF1D2F195AF9FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hishamjan_0-1617256707290.png" alt="hishamjan_0-1617256707290.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;On Splunk, is there a way to monitor each of its threads? Because sometimes, the threads reach 100% and my system stops working until the threads are down to the current percentage values as in the above screenshot.&lt;/P&gt;&lt;P&gt;Any degree of help will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 06:00:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546329#M90997</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-04-01T06:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546330#M90998</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228379"&gt;@hishamjan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, you can monitor everything,&lt;/P&gt;&lt;P&gt;You can use the Splunk AddOn for Unix and Linux (&lt;A href="https://splunkbase.splunk.com/app/833/" target="_blank"&gt;https://splunkbase.splunk.com/app/833/&lt;/A&gt;) to take the logs and the Splunk App for Unix and Linux (&lt;A href="https://splunkbase.splunk.com/app/273/" target="_blank"&gt;https://splunkbase.splunk.com/app/273/&lt;/A&gt;) to display information.&lt;/P&gt;&lt;P&gt;If instead you want a custom control, you can create a custom scripted input using the command you used for the screenshot (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptedInputsIntro&lt;/A&gt;) to index the values and you can crete your own dashboard.&lt;/P&gt;&lt;P&gt;Anyway I hint to try with the splunkbase apps before to start to develop a custom one.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 06:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546330#M90998</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-04-01T06:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546567#M91024</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry for the late response, but my Linux machine already has Splunk AddOn for Unix installed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to monitor its cores (threads)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 19:19:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546567#M91024</guid>
      <dc:creator>hishamjan</dc:creator>
      <dc:date>2021-04-02T19:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546600#M91028</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228379"&gt;@hishamjan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in the&amp;nbsp;&lt;SPAN&gt;Splunk AddOn for Unix there are some scripts that run Linux commands as&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;cpu or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;iostat or others: they, when enabled, take stats on the cpu utilization.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know the command you used in your screenshot, but if it's one of the already presente in app scripts you can take results only enabling it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If instead the command you used is another one, you can see how scripts are done in that app and create your own scripted input using your command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, in few words:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;create in the $SPLUNK_HOME/etc/apps/Splunk_TA_nix/bin the file your_command.sh;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;in the your_command.sh file put the command with all the options you want;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;enable it to be executed;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;create a stanza in inputs.conf (the one in local folder not in default) defining the frequency execution;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;restart splunk on the machine or deploy it using the Deployment Server.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;the script is very easy, it contains only the command as you run it in SSH.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the inputs.conf stanza is something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://./bin/your_command.sh]
sourcetype = cpu_usage
source = your_command
interval = 300
disabled = 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 15:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/546600#M91028</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-04-03T15:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/685389#M114356</link>
      <description>&lt;P&gt;This will do the trick:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.*) as cpu_* WHERE index=&amp;lt;your_metrics_index&amp;gt; by CPU, host
| table CPU, host
| eventstats max(CPU) as cpu_count by host
| table cpu_count, host
| eval cpu_count=cpu_count+&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the data being used is from the add on&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/AddOns/released/UnixLinux/Enabledataandscriptedinputs" target="_blank" rel="noopener"&gt;Link to the splunk add on for Splunk Add-on for Unix and Linux docs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 05:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/685389#M114356</guid>
      <dc:creator>jokertothequinn</dc:creator>
      <dc:date>2024-04-25T05:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor CPU cores of a Linux machine</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/693530#M115283</link>
      <description>&lt;P&gt;This is a query which can get you the cpu core for both nix and win servers:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| mstats avg(Processor.*) as * WHERE (index=win-metrics) instance!="_Total" host="***"  by host instance span=5m
| table _time, host, instance, "%_Processor_Time"
| stats max(instance) as "cpu_core" by host
| eval cpu_core=cpu_core + 1
| append
[| mstats avg(cpu_metric.*) as cpu_* WHERE (index=nix-metrics) host="***" by CPU, host
| table CPU, host
| eventstats max(CPU) as cpu_core by host
| stats max(cpu_core) as cpu_core by host
| eval cpu_core=cpu_core + 1 ]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 23:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-CPU-cores-of-a-Linux-machine/m-p/693530#M115283</guid>
      <dc:creator>jokertothequinn</dc:creator>
      <dc:date>2024-07-16T23:45:47Z</dc:date>
    </item>
  </channel>
</rss>

