Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Ubuntu mrtg swap partitions

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to exchange partitions in Ubuntu mrtg". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to exchange partitions with Ubuntu mrtg".

Ubuntu's software management system is the same as Debian's, using the APT management package, while there is also a graphical user interface Synaptic (Synaptic package Manager) available.

Ubuntu mrtg switching partition

Ubuntu mrtg switches to superuser:

Sudo-sH

Ubuntu mrtg create swap partition script:

Mkdir / opt/mrtg

Vim / opt/mrtg/mrtg.swap

#! / bin/bash

# This script to monitor the swap usage.

Totalswap= `/ usr/bin/free | grep Swap | awk'{print $2}'`

Usedswap= `/ usr/bin/free | grep Swap | awk'{print $3}'`

Echo "$totalswap"

Echo "$usedswap"

Ubuntu mrtg enables scripts to execute:

Chmod + 755 / opt/mrtg/mrtg.swap

Modify / etc/mrtg.cfg to add to file *

Target [swap]: `/ opt/mrtg/ mrtg.swap`

MaxBytes [swap]: 2048000

Title [swap]: Memory State of Server

ShortLegend [swap]: &

Kmg [swap]: kB,MB

Kilo [swap]: 1024

YLegend [swap]: Swap Usage

Legend1 [swap]: Total Swap

Legend2 [swap]: Used Swap

LegendI [swap]: Total Swap

LegendO [swap]: Used Swap

Options [swap]: growright,gauge,nopercent

PageTop [swap]: Swap

Rebuild the index page:

Indexmaker / etc/mrtg.cfg > / var/www/mrtg/index.html

At this point, I believe you have a deeper understanding of "how to exchange partitions in Ubuntu mrtg". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report