sunghun7511 / gotop Goto Github PK
View Code? Open in Web Editor NEWGotop is a resource monitoring tool written by Go π
License: MIT License
Gotop is a resource monitoring tool written by Go π
License: MIT License
λ¦°νΈμ λΉλκ° λλμ§ μ²΄ν¬λ₯Ό νκ³ , ν μ€νΈλ κ΅³μ΄ μλ―Έκ° μμ΄μ μν΄λ λ κ² κ°μμ.
νμ¬ cpu μ΄ μ¬μ©λ - μ΄μ cpu μ΄ μ¬μ©λ
μ μ΄μ©νμ¬ κ³μ°νλλ°, μ²μ μΌμ§λ κ²½μ°μλ μ΄μ cpu μ΄ μ¬μ©λ
μ΄ 0μ΄μ¬μ μμ£Ό ν° κ°μ΄ λμ€κ²λ¨.
μ²μμλ max(percent, 100)
κ³Ό κ°μ λ°©μλ μκ°νλλ°, λλΆλΆμ νλ‘μΈμ€λ€μ΄ 100μΌλ‘ λμμ μ¬μ ν μ΄μνκ² κ°μμ λ€λ₯Έ ν΄κ²° λ°©μμ΄ νμν΄ λ³΄μ
κΈ°λ³Έμ μΌλ‘ CPU μ 체 μ¬μ©λμ 보μ¬μ£Όκ³ , νΉμ ν€λ₯Ό λλ¬ κ°λ³ CPUμ μ¬μ©λμ κ°κ° 보μ¬μ£Όλλ‘ ν΄μ£ΌμΈμ
κ° widgetμμ μ²μ terminal ν¬κΈ° κΈ°μ€μΌλ‘ λ°μ΄ν°λ₯Ό μ μ₯νκ³ μμ΄μ μκΈ΄ μ΄μμ λλ€. resize μ΄λ²€νΈκ° λ°μ νμ λ, μ‘°μΉκ° νμν΄ λ³΄μ λλ€.
μΆκ°μ μΌλ‘, κ°λ₯νλ€λ©΄ ν¬κΈ°λ₯Ό mainμμ κ° μμ ―μΌλ‘ λ겨주λκ° ν΄μ widgetμ μμΉλ ν¬κΈ° μκ΄μμ΄ κ·Έλ €μ§ μ μμΌλ©΄ μ’μ κ² κ°μμ. μ§κΈμ [cpuWidget width] == [terminal width] && [memoryWidget width] == [terminal width] / 2
λ₯Ό κ°μ νκ³ μλλ°, μ΄κ² μμΉκ° λ°λμ΄μ widget widthμ terminal widthμ λΉμ¨μ΄ λ¬λΌμ§λλΌλ μ μλν μ μλλ‘ νλ©΄ μ’μ κ² κ°μμ.
core/process.go
νμΌμ GetCPUUsage
ν¨μμ GetMemUsage
ν¨μμ λ΄μ©μ΄ λλΆλΆ κ²ΉμΉλ κ² κ°μμ.
νμ±ν νμΌ μ΄λ¦, indexλ₯Ό μ μΈνλ©΄ λ΄μ©μ΄ μ€λ³΅λλ μ΄ λ κ°μ μΈμλ‘ λ°λ Private ν¨μλ₯Ό λ§λ€λ©΄ λ κ² κ°μμ!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.