LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2022, 08:55 PM   #1
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Rep: Reputation: 0
Creating databases/graphs from motd information using RRDtool


Hello,

when I log to my system (Ubuntu Server 20.04) I get the motd as follows:

Code:
  System information as of Fri Nov 25 02:48:55 UTC 2022

  System load:           2.01
  Usage of /:            64.7% of 1.79TB
  Memory usage:          94%
  Swap usage:            5%
  Temperature:           47.7 C
  Processes:             147
I would like to use RRDtool to save all these numbers (i.e. the system load, disk usage, memory usage (with swap), temperature and processes) and use it later to create nice graphs.
Is there a guide/tutorial on how to do this?
The closest tutorial I could find is this one
https://calomel.org/rrdtool.html
which however I don't know how to modify to get the numbers from motd.
 
Old 11-25-2022, 10:28 AM   #2
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
the dynamic motd runs scripts in /etc/update-motd.d. So you can get the script there that spits out those values in a file then you can graph them.
If you want it as an exercise or learning, fine.

Personally, I'd just install nagios and gets some existing plugins to localhost. You will get a way to display them, easily configured and graphed.

For instance, for system processes:

https://exchange.nagios.org/director...rics/Processes
 
Old 11-25-2022, 11:08 AM   #3
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Original Poster
Rep: Reputation: 0
The host is a Raspberry Pi which runs close to its limits, and I would rather make the log as lightweight as possible.

So I see the motd information output is from
Code:
/usr/bin/landscape-sysinfo
. Maybe instead I could just take the numbers separately, i.e.
Code:
uptime
,
Code:
df -h /dev/sda1
etc.
But my question is still on how to use these for updating a rrd database, i.e. in the example I posted, how would the
Code:
update_rrd_database.sh
script be for monitoring the system load?
 
  


Reply

Tags
motd, rrdtools



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RRDTool - PHP - Possible Incorrect Graphs mossy464 Linux - Software 0 04-26-2010 03:33 PM
Unable to create graphs with rrdtool athreyavc Linux - General 1 09-06-2009 09:00 AM
Bigsister Hell: My rrdtool graphs aren't working geokker Linux - Software 0 05-11-2006 05:45 AM
reversing rrdtool graphs whysyn Linux - Software 0 06-05-2005 04:31 PM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration