If you have a Linux server running at your office or at a data center for which you are responsible, you want to maintain an uptime of as close to a hundred percent. यदि आप एक Linux अपने कार्यालय में चल रहे सर्वर या एक डाटा सेंटर जिसके लिए आप जिम्मेदार हैं पर है, तो आप को एक सौ प्रतिशत के रूप में बंद के एक uptime बनाए रखना चाहते हैं. In such a case you want to make sure you keep an eye on how the system is running. ऐसी स्थिति में आप सुनिश्चित हैं कि आप कैसे व्यवस्था चल रहा है पर एक नज़र रखना बनाना चाहते हैं. To be precise you want to monitor all the system resources that contribute to the system running fine which then results in a high uptime. सटीक करने के लिए आप सभी सिस्टम संसाधन है कि ठीक एक उच्च uptime में जो चल रहा हो तो परिणाम की निगरानी प्रणाली में योगदान करना चाहते हैं. Memory, CPU, disk usage… are some of the things you want to observe. मैमोरी, CPU, डिस्क उपयोग ... बातें आप में से कुछ का पालन करना चाहते हैं. We would usually use a combination of the tools that come with a Linux or UNIX installation, such as “free”, “top”, “vmstat”… I'll introduce you to a tool that gives you just about all the info that the other tools combined give you, all under one roof – Dstat. हम आम तौर पर उपकरण है कि जैसे कि "मुक्त" एक Linux या UNIX स्थापना, साथ आने का एक संयोजन, "" शीर्ष उपयोग करते हैं, "vmstat" ... मैं तुम्हें एक उपकरण देता है कि तुम बस के बारे में सारी जानकारी से मिलवाता हूँ कि अन्य संयुक्त तुम्हें देने के उपकरण, सभी एक ही छत के नीचे Dstat -. The developer of this command line tool, Dag Wieers, calls it “a versatile replacement for vmstat, iostat, netstat and ifstat”. इस कमांड लाइन उपकरण, डेग Wieers के निर्माता, फोन इसे "vmstat, iostat, netstat और ifstat के लिए एक बहुमुखी प्रतिस्थापन". He adds that “Dstat overcomes some of their limitations and adds some extra features…” To me Dstat is the mother of all command line system monitoring tools. वे कहते हैं कि Dstat "अपनी सीमाओं में से कुछ पर काबू पा और कुछ अतिरिक्त सुविधाओं को कहते हैं, मेरे लिए ..." Dstat सारे कमांड लाइन प्रणाली की निगरानी उपकरणों की माँ है. It's simple to install, easy to use, can be tweaked with ease, and it generates reports that you can plot as a graph to impress your boss. इसे स्थापित करने के लिए, आसानी से उपयोग सरल, आसानी से tweaked किया जा सकता है, और यह रिपोर्ट है कि आप एक ग्राफ तुम्हारे मालिक को प्रभावित करने की साजिश के रूप में उत्पन्न कर सकते हैं.
Installing Dstat अधिष्ठापन Dstat
Start by downloading the Dstat installer. Dstat Installer डाउनलोड द्वारा शुरू करो. Point your web browser to the Dstat project's homepage – Dstat परियोजना की होमपेज में अपने वेब ब्राउज़र प्वाइंट -- http://dag.wieers.com/home-made/dstat/ http://dag.wieers.com/home-made/dstat/ . . Scroll down to the section of the page where the downloads are listed. जहां डाउनलोड सूचीबद्ध हैं पृष्ठ के भाग को नीचे स्क्रॉल करें. Pick the flavor of Linux on which you want to install the application and click on the download link. Linux के स्वाद चुनें जिस पर आप डाउनलोड लिंक पर क्लिक करें और आवेदन पत्र स्थापित करना चाहते हैं. Now download the latest version of Dstat for the version of the Linux distribution you are running. अब लिनक्स वितरण तुम चल रहे हैं के संस्करण के लिए Dstat का नवीनतम संस्करण डाउनलोड करें. I'll show you how to do it for a Red Hat Enterprise Linux version 4 machine: मैं तुम्हें दिखाता यह एक Red Hat Enterprise Linux संस्करण 4 मशीन के लिए कैसे करना होगा:
# wget http://dag.wieers.com/rpm/packages/dstat/dstat-0.6.6-1.el4.rf.noarch.rpm # Wget http://dag.wieers.com/rpm/packages/dstat/dstat-0.6.6-1.el4.rf.noarch.rpm
Now install Dstat: अब Dstat स्थापित करें:
# rpm -Uvh dstat-0.6.6-1.el4.rf.noarch.rpm # Rpm-Uvh dstat 0.6.6--1.el4.rf.noarch.rpm
If the installation went though without errors, that's it, you have Dstat installed and ready for use. यदि अधिष्ठापन त्रुटियों के बिना हालांकि गया था, कि यह है, तुम Dstat स्थापित और उपयोग के लिए तैयार हो जाओ. If there were some dependencies that came up during the installation just install the required packages and try again. अगर वहाँ कुछ निर्भरता है कि स्थापना के दौरान आया बस जरूरी संकुल अधिष्ठापित करें और फिर प्रयास किया गया. I don't think that Dstat has too many dependencies, so you should not face any problems. मुझे नहीं लगता है, कि Dstat बहुत अधिक निर्भरता करना है ताकि आप किसी भी समस्याओं का सामना नहीं करना चाहिए.
Using Dstat Dstat का उपयोग
With Dstat installed on your system you should be good to go. साथ Dstat आपके सिस्टम पर अधिष्ठापित तुम जाना अच्छा होना चाहिए. Begin by launching the command from a terminal: एक टर्मिनल से कमांड शुरू करने से शुरू:
# dstat # Dstat
The output would be something like the following. उत्पादन के बाद ऐसा कुछ होगा. Hit the key combination of ctrl+c to exit. Ctrl की कुंजी संयोजन मारो + ग से बाहर निकलें.
# dstat # Dstat
—-total-cpu-usage—- -disk/total -net/total- —paging– —system– - कुल CPU-उपयोग - -disk/total -net/total--पेजिंग प्रणाली -
usr sys idl wai hiq siq|_read write|_recv _send|__in_ _out_|_int_ _csw_ usr SYS idl वाई hiq siq | _read लिख | _recv _send | __in_ | _out_ _int_ _csw_
7 1 91 1 0 0| 0 0 | 0 0 | 0 0 | 0 0 7 1 1 91 0 0 | 0 0 | 0 0 | 0 0 | 0 0
1 0 99 0 0 0| 0 0 | 0 0 | 0 0 |1051 1945 1 0 0 99 0 0 | 0 0 | 0 0 | 0 0 | 1051 1945
0 0 100 0 0 0| 0 12k|2269B 11.2k| 0 0 |1031 1923 0 0 100 0 0 0 | 0 12k | 2269B 11.2k | 0 0 | 1031 1923
1 0 99 0 0 0| 0 40k| 0 0 | 0 0 |1078 2235 1 0 0 99 0 0 | 0 40k | 0 0 | 0 0 | 1078 2235
0 0 100 0 0 0| 0 16k|6027B 21.5k| 0 0 |1008 2219 0 0 100 0 0 0 | 0 16k | 6027B 21.5k | 0 0 | 1008 2219
There are a number of options available for Dstat. वहाँ Dstat के लिए उपलब्ध विकल्पों में से एक नंबर रहे हैं. As I mentioned earlier Dstat is quite easy to tweak. जैसा कि मैंने पहले उल्लेख किया Dstat काफी आसान tweak है. So if you want to limit the data reading to the CPU, disk, and network, run the following command: तो अगर आप CPU, डिस्क, और नेटवर्क, पढ़ने के लिए निम्न कमांड चलाने के आंकड़ों की सीमा चाहते हैं:
# dstat -CDN # Dstat-CDN
-disk/total -net/total- —paging– —system– -disk/total -net/total--पेजिंग प्रणाली -
_read write|_recv _send|__in_ _out_|_int_ _csw_ _read लिख | _recv | _send __in_ _out_ | _int_ _csw_
0 0 | 0 0 | 0 0 | 0 0 0 0 | 0 0 | 0 0 | 0 0
0 12k|2295B 9603B| 0 0 |1053 1957 0 12k | 2295B 9603B | 0 0 | 1053 1957
0 0 | 594B 0 | 0 0 |1002 1893 0 0 | 594B 0 | 0 0 | 1002 1893
0 960k| 292B 3346B| 0 0 |1072 2012 0 960k | 292B 3346B | 0 0 | 1072 2012
0 4096B| 64B 0 | 0 0 |1031 1939 0 4096B | 64B 0 | 0 0 | 1031 1939
You can find more options in the application's help document which you can access by entering the following: तुम है आवेदन मदद दस्तावेज़ में और अधिक विकल्प है जो आप निम्नलिखित में प्रवेश द्वारा का उपयोग कर सकते हैं मिल सकते हैं:
# dstat -h # Dstat-h
Play with the options a little so you get comfortable with them. विकल्पों के साथ खेलो थोड़ा तो तुम उनके साथ आराम से. The default interval between data reads is two seconds. आंकड़ों के बीच मूलभूत अंतराल पुस्तकें दो सेकंड है. You can change that interval if you need to. तुम उस अंतराल को बदलने की जरूरत है अगर आप कर सकते हैं. To increase the interval to ten seconds enter the following: दर्ज करने के लिए दस सेकंड के अंतराल में वृद्धि के बाद:
# dstat 10 # Dstat 10
Another useful feature is to get aggregated updates for each entry. एक और उपयोगी सुविधा के लिए प्रत्येक प्रविष्टि के लिए एकत्रित अद्यतन प्राप्त है. So you can have Dstat give you an update every ten seconds in a new line, but as the data changes your line itself gets updated every second. तो तुम Dstat तुम्हें एक नई पंक्ति में हर दस सेकंड अद्यतन किया है, लेकिन कर सकते हैं के रूप में आपके डेटा लाइन परिवर्तन ही हर दूसरे अद्यतन किया जाता है.
You might optionally want Dstat to give you five updates with a frequency of three seconds. आप वैकल्पिक Dstat तुम्हें देने के लिए तीन सेकंड के एक आवृत्ति के साथ पांच अद्यतन करना चाहते हो सकता है. Here's how you would go about doing that: यहाँ तुम क्या कर के बारे में कैसे जाना कि:
# dstat 3 5 # Dstat 3 5
—-total-cpu-usage—- -disk/total -net/total- —paging– —system– - कुल CPU-उपयोग - -disk/total -net/total--पेजिंग प्रणाली -
usr sys idl wai hiq siq|_read write|_recv _send|__in_ _out_|_int_ _csw_ usr SYS idl वाई hiq siq | _read लिख | _recv _send | __in_ | _out_ _int_ _csw_
3 1 95 2 0 0| 0 0 | 0 0 | 0 0 | 0 0 3 1 2 95 0 0 | 0 0 | 0 0 | 0 0 | 0 0
2 11 87 1 0 0| 0 180k|2581B 3239B| 0 0 |1136 697 2 11 1 87 0 0 | 0 180k | 2581B 3239B | 0 0 | 1136 697
7 8 85 0 0 0| 0 0 | 115k 106k| 0 0 |1603 3985 7 8 0 85 0 0 | 0 0 | 115k 106k | 0 0 | 1,603 3,985
2 1 98 0 0 0| 0 0 |77.5k 170k| 0 0 |1744 3856 2 1 0 98 0 0 | 0 0 | 77.5k 170k | 0 0 | 1744 3856
1 0 100 0 0 0| 0 0 |3451B 9993B| 0 0 |1045 149 1 0 100 0 0 0 | 0 0 | 3451B 9993B | 0 0 | 1045 149
2 1 94 4 0 0| 0 276k|20.4k 31.1k| 0 0 |1219 804 2 1 4 94 0 0 | 0 276k | 20.4k 31.1k | 0 0 | 1219 804
The feature that I find most useful is the output. विशेषता है कि मैं सबसे उपयोगी खोज उत्पादन है. Dstat allows you to have the output of a session written into a comma separated file which can later be imported into a spreadsheet application such as Microsoft Excel and the data can be plotted into a graph. Dstat तुम एक अल्पविराम से अलग फाइल जो बाद में ऐसे और Microsoft Excel डेटा एक ग्राफ में योजना बनाई जा सकता है के रूप में एक स्प्रेडशीट अनुप्रयोग में आयात किया जा सकता है में लिखा सत्र का उत्पादन करने की अनुमति देता है. Here is how it can be used. यह कैसे हो यह रहा है प्रयोग किया जा सकता.
# dstat –output /tmp/dstat_data.csv -CDN # Dstat-उत्पादन / tmp / dstat_data.csv-CDN
Let the above command run while you run your applications or do your testing on this machine. इसके बाद के संस्करण चलाने के आदेश चलो, जबकि आप अपने अनुप्रयोग चलाना या इस मशीन पर अपना परीक्षण करते हैं. Hit the key combination of ctrl+c when you are done. Ctrl की कुंजी संयोजन मारो + जब तुम कर रहे हैं ग. Open the file dstat_data.csv with a spreadsheet application such as Microsoft Excel or Open Office. खुला ऐसी Microsoft Excel या ओपन ऑफ़िस के रूप में एक स्प्रेडशीट अनुप्रयोग के साथ dstat_data.csv फ़ाइल. You can then select the columns you want plotted into a graph and let your spreadsheet application do the magic. तुम तो कॉलम आप एक ग्राफ में योजना बनाई चाहते हैं और अपने स्प्रेडशीट अनुप्रयोग जादू करना चुन सकते हैं.
Get a Report by Mail मेल की एक रिपोर्ट प्राप्त करें
There may be cases wherein you want to observe how your server is performing over a period of time. वहाँ मामलों जिसमें आप पालन कैसे आपके सर्वर समय की अवधि में प्रदर्शन कर रहा है चाहते हो सकता है. You can setup a background process in Linux that will give you a reading with a certain interval, generate a report, and mail out the file to you. आप स्थापना लिनक्स में एक पृष्ठभूमि प्रक्रिया कर सकते हैं कि आप एक निश्चित अंतराल के साथ पढ़ना, एक रिपोर्ट उत्पन्न कर देंगे, और मेल आप फ़ाइल बाहर. This can be especially useful during a stress-test. यह एक तनाव परीक्षण के दौरान विशेष रूप से उपयोगी हो सकता है. Here's how you could do that. यहाँ आप कैसे कर सकते हो. The following script will run Dstat for three hours, reading the data every 30 seconds, and will mail out the report to me@myemailid.com. निम्न स्क्रिप्ट तीन घंटे के लिए Dstat चलाने के लिए, डेटा हर 30 सेकंड है, और बाहर me@myemailid.com को मेल की रिपोर्ट करेंगे पढ़ने होगा.
#!/bin/bash ! # / bin / मार
dstat –output /tmp/dstat_data_mail.csv -CDN 30 360 tmp dstat-उत्पादन / / dstat_data_mail.csv-30 CDN 360
mutt -a /tmp/dstat_data_mail.csv -s “Dstat Report for 3 hour run” me@myemailid.com < /dev/null मठ के एक tmp / / dstat_data_mail.csv-3 घंटे चलने me@myemailid.com "</ dev / बातिल के लिए s" Dstat रिपोर्ट
Save the above script in a file called dstat_script.sh on your server, give it executable permission and then run it as a background process: एक फाइल में ऊपर स्क्रिप्ट सहेजें नामक अपने सर्वर पर dstat_script.sh, यह निष्पादन की अनुमति देता है और फिर इसे एक पृष्ठभूमि के रूप में चलाने की प्रक्रिया:
# chmod +x dstat_script.sh # Chmod + x dstat_script.sh
# nohup ./dstat_script.sh & # Nohup. / & Dstat_script.sh
Done. हो गया. Yes, it's that simple. हाँ, यह है कि आसान है. You will now be mailed this report after it's done running. अब आप इस रिपोर्ट के बाद इसे चालू किया है भेज दिया जाएगा. You can optionally schedule this script as a daily cron job so that you can receive this data every day. आप एक वैकल्पिक दैनिक क्रॉन जॉब के रूप में इस स्क्रिप्ट बहुत समय से कर सकते हैं कि तुम हर दिन इस डेटा प्राप्त कर सकते हैं.
As you may already have realized Dstat is a wonderful tool when applied to performance monitoring and debugging. जैसा कि आप पहले से ही Dstat सकता है एहसास हो गया है जब एक अद्भुत प्रदर्शन की निगरानी और debugging उपकरण के लिए आवेदन किया है. The granularity, frequency, and nature of the data collected are completely up to you. Granularity, आवृत्ति, और डाटा एकत्र की प्रकृति को पूरी तरह आप पर निर्भर हैं. Dstat empowers you to know what is going on on your server. Dstat अधिकार तुम्हें पता है क्या पर आपके सर्वर पर जा रहा है. Used wisely this power can result in a lot less sleepless nights for you. बुद्धिमानी से यह एक बहुत कम रातों की नींद हराम परिणाम भी हो सकते सत्ता में प्रयुक्त तुम्हारे लिए.























Nice article. अच्छा लेख.
I've just found a little discrepancy between dstat and dd regarding the I/O: मैं बस dstat के बीच थोड़ा फ़र्क पाया है और मैं के बारे में डीडी / हे:
ifx@ids:/opt/informix/devices$ dd if=file_20GB of=/dev/null bs=2048 count=10000000 ifx आईडी @: ऑप्ट / / informix / अगर = की file_20GB = / dev / बातिल बी एस dd $ उपकरणों = 2048 = 10,000,000 गिनती
10000000+0 Datensätze ein 10000000 0 Datensätze ईआईऍन
10000000+0 Datensätze aus 10000000 0 Datensätze ऑस्ट्रेलिया
20480000000 Bytes (20 GB) kopiert, 261,738 s, 78,2 MB/s एस 20480000000 बाइट्स (20 जीबी kopiert), 261,738 एस, 78,2 MB /
A shell running dstat at the same time showed me: एक ही समय में dstat चल खोल मुझे दिखाया:
-dsk/total—-dsk/hdc—–dsk/hdd– -dsk/total--dsk/hdc--dsk/hdd-
read writ: read writ: read writ पढ़ें रिट: रिट पढ़ें: पढ़ें रिट
140M 104k: 62M 24k:7960k 28k 140M 104k: 62M 24k: 7960k 28k
150M 0 : 64M 0 : 12M 0 150M 0: 64M 0: 12M 0
160M 0 : 0 0 : 80M 0 160M 0: 0 0: 80M 0
154M 0 : 43M 0 : 34M 0 154M 0: 43M 0: 34M 0
150M 0 : 75M 0 : 0 0 150M 0: 75M 0: 0 0
153M 56k:8384k 20k: 68M 8192B 153M 56K: 8384k 20k: 68M 8192B
So it looks like we all should use dstat if we want to impress people with big numbers. तो ऐसा लगता है कि हम सब dstat उपयोग अगर हम बड़ी संख्या के साथ लोगों को प्रभावित करना चाहते चाहिए.
Looks also like you shouldn't compare dstat to something else than dstat if you really want to compare systems, I doubt I'll use it any more for this kind of stuff any more. तुम भी ऐसा लगता है dstat से कुछ और करने dstat की तुलना नहीं अगर तुम सच में सिस्टम की तुलना चाहता हूँ, मुझे शक है मैं इसे इस तरह की सामग्री के लिए और अधिक किसी भी इस्तेमाल करेंगे किसी भी अधिक चाहिए.