Otu esi etinye nlebanya Sistemu Glances na Debian 11

Nyochaa Sistemụ Nlele bụ n'efu, ngwá ọrụ ahịrị iwu mepere emepe maka nlekota usoro, akụrụngwa sistemu dị ka CPU, Disk I/O, Sistemụ Faịlụ, Nkezi Ibu, Ebe nchekwa, Interfaces na usoro. A na-eji asụsụ Python arụ ile anya. Nlegharị anya na-akwado nleba anya n'ofe ikpo okwu, nke enwere ike iji ya na ntanetị dabere na webụ.

Otu n'ime njirimara mara mma Glances na-akwado bụ ikike ịtọ oke na mmemme. Ị nwere ike idobe nlezianya, ịdọ aka ná ntị, na nke siri ike na faịlụ nhazi ahụ, nke ga-ebufe ozi na agba nke nwere ike igosi ọkwa maka nkwụsị nke akụrụngwa sistemụ, nsogbu akụrụngwa sistemụ, na ọtụtụ ndị ọzọ. Nlere anya, na ndabara, na-abịa na ndepụta agba agbagoro agbagoro, mana ị nwere ike gbanwee ma tinye nhazi agbakwunyere.

Ọmụmaatụ nke nhazi njedebe nke Glances na-arụ ọrụ.

Otu esi etinye nlebanya Sistemu Glances na Debian 11

N'ime nkuzi na-esote, ị ga-amụta ka esi etinye na iji Glances na Debian 11 Bullseye.

Prerequisites

  • OS akwadoro: Nnenna 11 Bullseye
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ihe ùgwù or ohere mgbọrọgwụ (su Command).
  • Ngwungwu achọrọ: python, pip, psutils

Na-emelite Sistemụ Ọrụ

Melite gi Debian 11 Sistemụ arụmọrụ iji hụ na ngwugwu niile dị adị adịla ugbu a:

sudo apt update && sudo apt upgrade

Mgbọrọgwụ ma ọ bụ Sudo Access

Site na ndabara, mgbe ị mepụtara akaụntụ gị na mmalite na Debian ma e jiri ya tụnyere nkesa ndị ọzọ, ọ naghị enweta ọkwa sudoers ozugbo. Ị ga-enwerịrị ike ịnweta ya mgbọrọgwụ paswọọdụ iji iwu su ma ọ bụ gaa na nkuzi nkuzi anyị Otu esi etinye onye ọrụ na Sudoers na Debian.


Advertisement


Wụnye Nyochaa Sistemụ Nleba anya

Tupu ịwụnye Glances, ịkwesịrị ijide n'aka na ị tinyela ya Python 2.7 ma ọ bụ karịa yana psutil 5.30 ma ọ bụ karịa. Ọ bụrụ na i tinyebeghị nke ọ bụla, mee iwu a:

sudo apt install python3 python3-dev python3-jinja2 python3-psutil python3-setuptools hddtemp python3-pip lm-sensors -y

Nke a ga-etinye ndabere kachasị ọhụrụ site na iji ebe nchekwa ndabere Debian 11.

Iji wụnye Glances System Monitor na Debian, ịkwesịrị iji tinye ya PIP3. Iji mee nke a, mebie iwu a:

sudo pip3 install glances

Ihe atụ mmepụta:

Otu esi etinye nlebanya Sistemu Glances na Debian 11

Nyochaa nrụnye site na ịlele ihe nrụpụta Glances:

glances --version

Ihe atụ mmepụta:

Glances v3.2.3.1 with PsUtil v5.8.0
Log file: /root/.local/share/glances/glances.log

Otu esi eji Glances System Monitor

Ozugbo itinyechara mmemme ahụ, ịkwesịrị pịnye iwu ọnụ ọnụ iji weta ya.

glances --theme-white

Mara, ị ga-achọpụta – isiokwu-ọcha ọkọlọtọ agbakwunyere na iwu ahụ, nyere Debian ndabere njedebe njedebe bụ ọcha; ọ bụrụ na i jiri iwu nlele ndabara bulite ya, ọ ga-adị aghụghọ ịgụ ma ọ bụrụ na ị gbanweela na ndabere ọcha na ndabara ka ọ bụrụ ojii.

Ọmụmaatụ na-eji iwu nlele anya ndabara:

Otu esi etinye nlebanya Sistemu Glances na Debian 11

Ọmụmaatụ na-eji iwu nlele -theme-white:

Otu esi etinye nlebanya Sistemu Glances na Debian 11

Iji pụọ na mmemme Glances, ị nwere ike iji iwu a.

Ctrl+C

Ị nwere ike ịgbanwe nkeji oge nke mmelite Glance, ndabara bụ 1, mana ị nwere ike ịgbanwe nke a dịka ọmụmaatụ:

glances -t 3

Ka iwelite iwu enyemaka, tinye ihe ndị a.

glances -h

Advertisement


Mkpu na nlele Sistemụ Nleba anya

Dịka ekwuru na mmalite nkuzi, Glances nwere agba maka ọkwa. Ihe na-esonụ na-akọwa ihe ha bụ.

  1. Akwụkwọ ndụ akwụkwọ ndụ: OK (mma)
  2. Acha anụnụ anụnụ: Kpachara anya (nlebara anya)
  3. VIOLET: ỊDỌ AKA NA NTỊ (ọmụma)
  4. Uhie: OKWU (dị oke egwu)

Ọnụ ụzọ na ntọala ndabara bụ ndị a.

  • kpachara anya=50
  • ịdọ aka ná ntị=70
  • oké egwu=90

Enwere ike ịgbanwe nhazi nke ndabara. Iji mee nke a, mepee ndezi ederede na faịlụ ahụ /etc/glances/glances.conf. Mana nke mbụ, ka anyị mee nkwado ndabere nke faịlụ nhazi mbụ maka nchekwa.

sudo cp /usr/local/share/doc/glances/glances.conf /usr/local/share/doc/glances/glances-bkup.conf

Na-esote, na-eji nano ederede editọ, mepee faịlụ nhazi isi:

sudo nano /usr/local/share/doc/glances/glances.conf

Pịgharịa gaa ala (Akara nke 37), ị ga-amalite ịhụ ntọala niile ị nwere ike ịgbanwe.

Ihe Nlereanya:

Otu esi etinye nlebanya Sistemu Glances na Debian 11

Gbanwee ọnụọgụgụ, yabụ CTRL + O ịzọpụta, yabụ CTRL + X ịpụ apụ. Ihe ndabara kwesịrị ịdị mma maka ọtụtụ ntọala onye ọrụ; naanị dezie ma ọ bụrụ na ị kwenyeghị na ụkpụrụ ndị a.

Iwu nleba anya sistemụ

Ị nwere ike iji iwu ndepụta ndị a na Glances iji hazie, chọta ma gosi ihe ị na-achọ.

  • to - Hazie usoro na-akpaghị aka
  • c - Hazie usoro site na CPU%
  • m - Hazie usoro site na MEM%
  • p - Hazie usoro n'aha
  • i - Hazie usoro site na ọnụego I/O
  • d - Gosi/zoo stats I/O disk ols
  • f - Gosi/zoo sistemu faịlụ statshddtemp
  • n - Gosi/zobe ọnụọgụ netwọkụ
  • s - Gosi/zoo stats sensọ
  • y - Gosi/zoo stats hddtemp
  • l - Gosi/zobe ndekọ
  • b - Bytes ma ọ bụ bits maka netwọk I/Oools
  • w - Hichapụ ndekọ ịdọ aka ná ntị
  • x - Hichapụ ịdọ aka ná ntị na ndekọ dị egwu
  • x - Hichapụ ịdọ aka ná ntị na ndekọ dị egwu
  • 1 - CPU zuru ụwa ọnụ ma ọ bụ kwa-CPU stats
  • h - Gosi/zoo ihuenyo enyemaka a
  • t - Lelee netwọk I/O dị ka ngwakọta
  • ị - Lelee netwọk I/O nchịkọta
  • q- Kwụsị (Esc na Ctrl-C na-arụkwa ọrụ)

Advertisement


Gbaa nlebanya sistemu elegharị anya na ihe nchọgharị webụ

Ị nwere ike nyochaa nlele na ihe nchọgharị weebụ kachasị amasị gị. Awụnyere ndabere niile dị ka ndabara. Iji malite ọrụ ihe nchọgharị na mmemme ahụ, mee ihe ndị a.

glances -w

Rịba ama na ị ga-ahụrịrị na ngosipụta ọnụ "Nleba anya interface onye ọrụ webụ malitere na http://0.0.0.0:61208" mgbe ị na-abanye iwu a. Nke a nwere ike ịdị ntakịrị mgbagwoju anya, ma ọ na-eji adreesị IP nke ihe nkesa ahụ n'ezie.

Ị nwere ike ịtọ paswọọdụ maka ihe nleba anya dabere na webụ site na ịpị iwu a.

glances -w --password

Iji mepee ihe nchọgharị weebụ maka mmemme ahụ, jiri ọdụ ụgbọ mmiri 61209 nke ndabara tinye adreesị IP gị dị ka ọmụmaatụ.

http://203.15.33.190:61209

Maka onye ahịa gị bụ isi, ị nwere ike idobe nlele na-aga n'azụ site na iji iwu a.

glances -w &

Ihe dị n'elu na-emepụta usoro ịgba ọsọ ndabere. Ugbu a ị ga-ajụrịrị ọnọdụ dị ugbu a.

disown

Ọ bụrụ na ịchọrọ igbu ndị nhazi na ọnọdụ ndabere, pịnye ihe ndị a iji gbuo oge nlele niile na-arụ ọrụ.

killall glances

Gbaa ọnọdụ onye ahịa-ihe nkesa

Akụkụ ọzọ mara mma nke mmemme Glances bụ na ọ na-enye nhazi ihe nkesa ndị ahịa. Nke a pụtara na ị nwere ike ilele anya na ọtụtụ sava dịpụrụ adịpụ wee jikọọ ha na ndị ahịa gị mbụ. Sava niile ga-enwerịrị nlegharị anya arụnyere.

Nbanye na sava dịpụrụ adịpụ, malite mmemme nlele na ọnọdụ n'akụkụ sava.

glances -s

Mgbe ịmechara ịmalite nleba anya n'akụkụ ihe nkesa na sava niile achọrọ, gaa na sistemụ ndị ahịa gị wee jikọọ na adreesị IP sistemụ na-agba ọnọdụ sava-onye ahịa yana iwu a.

glances -c server-IP-address

Advertisement


Otu esi emelite nlele site na iji PIP3

Nyere nlele etinyere na iji PIP, ị ga-achọkwa ịlele mmelite site na iji iwu na-esote oge ụfọdụ:

pip3 install --upgrade glances
pip3 install --upgrade psutil

Nke a ga-akwalite ihe ndị bụ isi. Agbanyeghị, a na-atụ aro ka ịme iwu a na-ekpuchi ihe niile:

pip3 install --upgrade glances[all]

Ma nke ahụ bụ ya; ọ bụrụ na mmelite dị, ọ ga-akwalite; ọ bụrụ na ọ bụghị, otu ụdị ahụ ga-anọrịrị.

Otu esi ewepu (wepụ) Nyochaa Sistemụ Nleba anya

Iji wepu anya na sistemu Debian gị, jiri iwu iwepụ PIP3 a:

sudo pip3 uninstall glances

Ihe atụ mmepụta:

Found existing installation: Glances 3.2.3.1
Uninstalling Glances-3.2.3.1:
  Would remove:
    /usr/local/bin/glances
    /usr/local/lib/python3.9/dist-packages/Glances-3.2.3.1.dist-info/*
    /usr/local/lib/python3.9/dist-packages/glances/*
    /usr/local/share/doc/glances/AUTHORS
    /usr/local/share/doc/glances/CONTRIBUTING.md
    /usr/local/share/doc/glances/COPYING
    /usr/local/share/doc/glances/NEWS.rst
    /usr/local/share/doc/glances/README.rst
    /usr/local/share/doc/glances/glances.conf
    /usr/local/share/man/man1/glances.1
Proceed (y/n)? 

Ụdị Y, wee pịa Tinye igodo ka ịga n'ihu na iwepụ ya.


Advertisement


Okwu na mmechi

Nyochaa Sistemụ Nleba anya bụ nzọụkwụ dị elu karịa ndabara "n'elu" ngwugwu maka nlekota akụrụngwa na nhazi usoro. Ngwungwu a dị mma, ọkachasị ma ọ bụrụ na ịchọrọ nyocha nke ọma nke sistemụ gị. Ọ na-ekpuchi ọtụtụ ozi ma weta ya na koodu agba iji gosi ihe data dị n'ihu gị pụtara yana otu o si emetụta ihe nkesa gị.

Uru agbakwunyere nke nlekota anya na-eme ka nke a bụrụ otu n'ime nhọrọ ndị a ma ama maka nlekota ihe nkesa dị mfe. Ọ na-aga n'ihu na-akawanye mma site na mmepe na-arụsi ọrụ ike na-aga n'ihu ruo taa.

Ahapụ a Comment