---
title: "系统监控的工具tsar"
author: "xiamizy"
date: "2014-05-16T15:25:18Z"
tags: ["系统监控"]
categories: ["操作系统"]
slug: "tsar"
draft: false
lastmod: "2014-08-25T21:36:45Z"
id: 2067395
url: "https://mitchz.iteye.com/blog/2067395"
---

近期一直在折腾着elasticsearch，需要对硬件进行评估

大概几方面 内存 cpu 硬盘 网络。

iostat

vmstat

top

几个命令用了一堆，其实需要关注的几个点只要都列出来就可以了

 

```
[root@cloud-15 tsar-master]# tsar -l -i 1
Time              ---cpu-- ---mem-- ---tcp-- -----traffic---- --sda--- --sr0---  ---load- 
Time                util     util   retran    bytin  bytout     util     util     load1   
16/05/14-15:17:28   0.37    74.49     0.00     2.5K    6.3K   100.00     0.00      0.01   
16/05/14-15:17:29   0.00    74.49     0.00     1.3K    1.4K     0.00     0.00      0.01   
```

 用起来很方便

 

-l live

-i 设置时间 单位秒

 

基本信息都可以汇总到。

 

安装方法

https://github.com/alibaba/tsar

下载master版本,安装就可以了

```
$ wget -O tsar.zip https://github.com/alibaba/tsar/archive/master.zip --no-check-certificate
$ unzip tsar.zip
$ cd tsar
$ make
# make install
```

 总之，简单好用