├── 信息.png ├── 错-.png ├── cpu.png ├── mem.png ├── sys.png ├── 服务器内存监控.png ├── 服务器状态监控.png ├── 错- (1).png ├── 服务器cpu监控.png ├── 服务器内存监控 (1).png ├── main.cpp ├── res.qrc ├── tools ├── tools.h └── tools.cpp ├── drawer.ui ├── info_dialog.h ├── README.md ├── info_dialog.cpp ├── drawer.h ├── ActivityMonitor.pro ├── mainwindow.h ├── drawer.cpp ├── info_dialog.ui ├── mainwindow.ui ├── mainwindow.cpp └── ActivityMonitor.pro.user /信息.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/信息.png -------------------------------------------------------------------------------- /错-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/错-.png -------------------------------------------------------------------------------- /cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/cpu.png -------------------------------------------------------------------------------- /mem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/mem.png -------------------------------------------------------------------------------- /sys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/sys.png -------------------------------------------------------------------------------- /服务器内存监控.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/服务器内存监控.png -------------------------------------------------------------------------------- /服务器状态监控.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/服务器状态监控.png -------------------------------------------------------------------------------- /错- (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/错- (1).png -------------------------------------------------------------------------------- /服务器cpu监控.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/服务器cpu监控.png -------------------------------------------------------------------------------- /服务器内存监控 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeymarL/Linux-Activity-Monitor/HEAD/服务器内存监控 (1).png -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWindow w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 错-.png 4 | 错- (1).png 5 | 服务器cpu监控.png 6 | 服务器内存监控.png 7 | 服务器内存监控 (1).png 8 | 服务器状态监控.png 9 | 信息.png 10 | 11 | 12 | -------------------------------------------------------------------------------- /tools/tools.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLS_H 2 | #define TOOLS_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | bool is_digit(char* str); 13 | std::map* get_username_dict(); 14 | std::string get_proper_unit(int num); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /drawer.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Drawer 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /info_dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef INFO_DIALOG_H 2 | #define INFO_DIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "tools/tools.h" 9 | #include 10 | 11 | namespace Ui { 12 | class Info_dialog; 13 | } 14 | 15 | class Info_dialog : public QDialog 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit Info_dialog(QWidget *parent = 0); 21 | ~Info_dialog(); 22 | 23 | private: 24 | Ui::Info_dialog *ui; 25 | 26 | void read(); 27 | }; 28 | 29 | #endif // INFO_DIALOG_H 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Linux Activity Monitor 2 | 3 | This application is able to monitor each process's cpu and memory utilization, cpu time, state, PID and user information by analyzing Linux/Unix's `\proc` virtual file sysyem. It can also display the overall information of cpu and memory use ratio, as well as the basic information of the machine. 4 | 5 | The project is written in C++ with Qt4. 6 | 7 | ## Screenshots 8 | 9 | * CPU information 10 | 11 | ![cpu](cpu.png) 12 | 13 | * Memory information 14 | 15 | ![mem](mem.png) 16 | 17 | * Basic system information 18 | 19 | ![sys](sys.png) 20 | -------------------------------------------------------------------------------- /info_dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "info_dialog.h" 2 | #include "ui_info_dialog.h" 3 | 4 | Info_dialog::Info_dialog(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::Info_dialog) 7 | { 8 | ui->setupUi(this); 9 | read(); 10 | } 11 | 12 | void Info_dialog::read() 13 | { 14 | std::ifstream input; 15 | input.open("/proc/cpuinfo"); 16 | if (input.is_open()) { 17 | char buf[10000]; 18 | input.read(buf, 10000); 19 | ui->textEdit->setText(buf); 20 | input.close(); 21 | } else { 22 | qDebug() << "Cannot open /proc/cpuinfo"; 23 | } 24 | } 25 | 26 | Info_dialog::~Info_dialog() 27 | { 28 | delete ui; 29 | } 30 | -------------------------------------------------------------------------------- /drawer.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWER_H 2 | #define DRAWER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace Ui { 12 | class Drawer; 13 | } 14 | 15 | struct Point { 16 | int x; 17 | int y; 18 | Point(int x_point, int y_point) { 19 | x = 159 - x_point; 20 | y = 100 - y_point; 21 | } 22 | }; 23 | 24 | class Drawer : public QFrame 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | explicit Drawer(QWidget *parent = 0); 30 | ~Drawer(); 31 | int X(int x); // trans coordinate 32 | int Y(float y); 33 | void add_data(float data); 34 | 35 | void change_queue(); 36 | 37 | private: 38 | void paintEvent(QPaintEvent*); 39 | 40 | Ui::Drawer *ui; 41 | int width = 160; 42 | int height = 101; 43 | int dist = 2; 44 | std::vector* data_queue; 45 | std::vector* cpu_queue; 46 | std::vector* mem_queue; 47 | int size = width / dist; 48 | }; 49 | 50 | #endif // DRAWER_H 51 | -------------------------------------------------------------------------------- /ActivityMonitor.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2017-02-16T12:59:29 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = ActivityMonitor 12 | TEMPLATE = app 13 | 14 | # The following define makes your compiler emit warnings if you use 15 | # any feature of Qt which as been marked as deprecated (the exact warnings 16 | # depend on your compiler). Please consult the documentation of the 17 | # deprecated API in order to know how to port your code away from it. 18 | DEFINES += QT_DEPRECATED_WARNINGS 19 | 20 | # You can also make your code fail to compile if you use deprecated APIs. 21 | # In order to do so, uncomment the following line. 22 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 23 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 24 | 25 | 26 | SOURCES += main.cpp\ 27 | mainwindow.cpp \ 28 | drawer.cpp \ 29 | tools/tools.cpp \ 30 | info_dialog.cpp 31 | 32 | HEADERS += mainwindow.h \ 33 | drawer.h \ 34 | tools/tools.h \ 35 | info_dialog.h 36 | 37 | FORMS += mainwindow.ui \ 38 | drawer.ui \ 39 | info_dialog.ui 40 | 41 | RESOURCES += \ 42 | res.qrc 43 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "tools/tools.h" 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "info_dialog.h" 22 | 23 | #define CPU 0 24 | #define MEM 1 25 | #define CLK_TCK 100 26 | 27 | namespace Ui { 28 | class MainWindow; 29 | } 30 | 31 | class MainWindow : public QMainWindow 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | explicit MainWindow(QWidget *parent = 0); 37 | ~MainWindow(); 38 | 39 | private: 40 | void get_cpu_stat(); 41 | 42 | void get_process_info(int); 43 | 44 | void init_table(); 45 | 46 | void refocus(); 47 | 48 | void get_mem_stat(); 49 | 50 | private slots: 51 | void update_data(); 52 | 53 | void on_cpu_button_clicked(); 54 | 55 | void on_mem_button_clicked(); 56 | 57 | void on_tableView_clicked(const QModelIndex &index); 58 | 59 | void on_pushButton_3_clicked(); 60 | 61 | void on_pushButton_clicked(); 62 | 63 | private: 64 | Ui::MainWindow *ui; 65 | QTimer* timer; 66 | int total_cpu_time; 67 | int total_user_time; 68 | int total_sys_time; 69 | int total_idle_time; 70 | int state; 71 | QStandardItemModel* model; 72 | QStandardItemModel* cpu_model; 73 | QStandardItemModel* mem_model; 74 | std::map* process_map; 75 | std::map* username_dict; 76 | int num_processes; 77 | int last_pid; 78 | int mem_size; 79 | }; 80 | 81 | #endif // MAINWINDOW_H 82 | -------------------------------------------------------------------------------- /drawer.cpp: -------------------------------------------------------------------------------- 1 | #include "drawer.h" 2 | #include "ui_drawer.h" 3 | 4 | Drawer::Drawer(QWidget *parent) : 5 | QFrame(parent), 6 | ui(new Ui::Drawer) 7 | { 8 | ui->setupUi(this); 9 | cpu_queue = new std::vector; 10 | mem_queue = new std::vector; 11 | data_queue = cpu_queue; 12 | } 13 | 14 | void Drawer::paintEvent(QPaintEvent *event) 15 | { 16 | QPainterPath path; 17 | int n = data_queue->size(); 18 | 19 | path.moveTo(width - 1, height - 1); 20 | 21 | for (int i = 0; i < n; i++) { 22 | path.lineTo((*data_queue)[i].x, (*data_queue)[i].y); 23 | } 24 | if (n != 0) { 25 | path.lineTo((*data_queue)[n - 1].x, height - 1); 26 | } 27 | 28 | QPainter painter(this); 29 | painter.setPen(QPen(QColor(250, 50, 38), 1, Qt::SolidLine, 30 | Qt::FlatCap, Qt::MiterJoin)); 31 | painter.setBrush(QColor(255, 183, 177)); 32 | painter.drawPath(path); 33 | } 34 | 35 | void Drawer::change_queue() 36 | { 37 | if (data_queue == cpu_queue) { 38 | data_queue = mem_queue; 39 | } else { 40 | data_queue = cpu_queue; 41 | } 42 | } 43 | 44 | /** 45 | * @brief Drawer::add_data 46 | * @param data 0 <= data <= 1 47 | */ 48 | void Drawer::add_data(float data) 49 | { 50 | int y = (int)(this->height * data); 51 | int n = data_queue->size(); 52 | int x = 0; 53 | if (n >= this->size) { 54 | // delete the last one 55 | data_queue->pop_back(); 56 | n--; 57 | } 58 | // move forward 59 | for (int i = 0; i < n; i++) { 60 | (*data_queue)[i].x -= 2; 61 | } 62 | Point point(x, y); 63 | // push front 64 | data_queue->insert(data_queue->begin(), point); 65 | // update canvas 66 | update(); 67 | } 68 | 69 | Drawer::~Drawer() 70 | { 71 | delete cpu_queue; 72 | delete mem_queue; 73 | delete ui; 74 | } 75 | -------------------------------------------------------------------------------- /tools/tools.cpp: -------------------------------------------------------------------------------- 1 | #include "tools.h" 2 | #include "string.h" 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | 8 | bool is_digit(char* str) 9 | { 10 | int n = strlen(str); 11 | for (int i = 0; i < n; i++) { 12 | if (str[i] < '0' || str[i] > '9') { 13 | return false; 14 | } 15 | } 16 | return true; 17 | } 18 | 19 | map* get_username_dict() 20 | { 21 | ifstream input; 22 | input.open("/etc/passwd"); 23 | map* dict; 24 | if (input.is_open()) { 25 | dict = new map; 26 | char buffer[100]; 27 | 28 | while (input.getline(buffer, 100)) { 29 | int i = 0; 30 | char* p = strtok(buffer, ":"); 31 | char* name = NULL; 32 | while (p && i < 3) { 33 | if (i == 0) { 34 | name = p; 35 | } else if (i == 2) { 36 | int uid = atoi(p); 37 | (*dict)[uid] = string(name); 38 | } 39 | //qDebug() << p << endl; 40 | i++; 41 | p = strtok(NULL, ":"); 42 | } 43 | } 44 | } 45 | else { 46 | return NULL; 47 | } 48 | // map::iterator it; 49 | // for(it = dict->begin(); it != dict->end(); ++it) 50 | // qDebug() <<"key: "<< it->first <<" value: "<< (it->second).c_str() << endl; 51 | return dict; 52 | } 53 | 54 | string get_proper_unit(int num) 55 | { 56 | string str = "KB"; 57 | float fnum = num; 58 | if (fnum > 1024) { 59 | fnum /= 1024; 60 | str = "MB"; 61 | } 62 | if (fnum > 1024) { 63 | fnum /= 1024; 64 | str = "GB"; 65 | } 66 | char buf[20]; 67 | if (fnum > 99) { 68 | sprintf(buf, "%.1f %s", fnum, str.c_str()); 69 | } else { 70 | sprintf(buf, "%.2f %s", fnum, str.c_str()); 71 | } 72 | 73 | return string(buf); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /info_dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Info_dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 421 10 | 476 11 | 12 | 13 | 14 | 系统信息 15 | 16 | 17 | background-color:rgb(236, 236, 236); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 0 25 | 0 26 | 27 | 28 | 29 | CPU信息 30 | 31 | 32 | 33 | 34 | 35 | 10 36 | 37 | 38 | 39 | 40 | 41 | 0 42 | 0 43 | 44 | 45 | 46 | CPU名字: 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 55 | 0 56 | 57 | 58 | 59 | Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 10 69 | 70 | 71 | 72 | 73 | 74 | 0 75 | 0 76 | 77 | 78 | 79 | CPU核数: 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 0 88 | 0 89 | 90 | 91 | 92 | 8 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 10 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 0 109 | 110 | 111 | 112 | CPU频率: 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 0 121 | 0 122 | 123 | 124 | 125 | 2194.918 MHz 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 10 135 | 136 | 137 | 138 | 139 | 140 | 0 141 | 0 142 | 143 | 144 | 145 | 缓存大小: 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 0 154 | 0 155 | 156 | 157 | 158 | 6144 KB 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 0 172 | 0 173 | 174 | 175 | 176 | 版本信息 177 | 178 | 179 | 180 | 181 | 182 | 10 183 | 184 | 185 | 186 | 187 | 188 | 0 189 | 0 190 | 191 | 192 | 193 | 内核版本: 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 0 202 | 0 203 | 204 | 205 | 206 | Linux version 4.2.0-27-generic 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 10 216 | 217 | 218 | 219 | 220 | 221 | 0 222 | 0 223 | 224 | 225 | 226 | 编译器版本: 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 0 235 | 0 236 | 237 | 238 | 239 | gcc version 4.8.2 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 详细信息 252 | 253 | 254 | 255 | 256 | 257 | true 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | Qt::Horizontal 268 | 269 | 270 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | buttonBox 280 | accepted() 281 | Info_dialog 282 | accept() 283 | 284 | 285 | 248 286 | 254 287 | 288 | 289 | 157 290 | 274 291 | 292 | 293 | 294 | 295 | buttonBox 296 | rejected() 297 | Info_dialog 298 | reject() 299 | 300 | 301 | 316 302 | 260 303 | 304 | 305 | 286 306 | 274 307 | 308 | 309 | 310 | 311 | 312 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 604 10 | 559 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Activity Monitor 21 | 22 | 23 | 24 | :/new/prefix1/服务器内存监控.png:/new/prefix1/服务器内存监控.png 25 | 26 | 27 | QMainWindow { 28 | border-radius:25px; 29 | } 30 | 31 | 32 | 33 | QWidget { 34 | background-color:rgb(236, 236, 236); 35 | } 36 | 37 | 38 | 39 | 40 | 41 | 10 42 | 43 | 44 | QLayout::SetNoConstraint 45 | 46 | 47 | 48 | 49 | 0 50 | 51 | 52 | QLayout::SetFixedSize 53 | 54 | 55 | 0 56 | 57 | 58 | 75 59 | 60 | 61 | 62 | 63 | 0 64 | 65 | 66 | 0 67 | 68 | 69 | 70 | 71 | false 72 | 73 | 74 | 75 | 76 | 77 | 78 | :/new/prefix1/错- (1).png:/new/prefix1/错- (1).png 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | :/new/prefix1/信息.png:/new/prefix1/信息.png 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | Qt::Horizontal 99 | 100 | 101 | 102 | 40 103 | 20 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | false 112 | 113 | 114 | 115 | 80 116 | 25 117 | 118 | 119 | 120 | 121 | 80 122 | 25 123 | 124 | 125 | 126 | background-color:rgb(108,107,108); 127 | color:rgb(255,254,250); 128 | 129 | 130 | CPU 131 | 132 | 133 | 134 | 135 | 136 | 137 | Memory 138 | 139 | 140 | 141 | 142 | 143 | 144 | Qt::Horizontal 145 | 146 | 147 | 148 | 40 149 | 20 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | QTableView { 160 | background-color:rgb(255, 255, 255); 161 | font-size:13px; 162 | } 163 | 164 | 165 | 166 | QAbstractItemView::NoEditTriggers 167 | 168 | 169 | false 170 | 171 | 172 | true 173 | 174 | 175 | QAbstractItemView::SingleSelection 176 | 177 | 178 | QAbstractItemView::SelectRows 179 | 180 | 181 | true 182 | 183 | 184 | Qt::SolidLine 185 | 186 | 187 | false 188 | 189 | 190 | 70 191 | 192 | 193 | false 194 | 195 | 196 | 20 197 | 198 | 199 | 22 200 | 201 | 202 | 203 | 204 | 205 | 206 | 0 207 | 208 | 209 | QLayout::SetFixedSize 210 | 211 | 212 | 213 | 214 | Qt::Horizontal 215 | 216 | 217 | QSizePolicy::Minimum 218 | 219 | 220 | 221 | 40 222 | 20 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 0 232 | 0 233 | 234 | 235 | 236 | QWidget{ 237 | background-color: rgb(255, 255, 255); 238 | 239 | } 240 | Line { 241 | color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255)) 242 | } 243 | QLabel { 244 | font-size:13px 245 | } 246 | 247 | 248 | 249 | 0 250 | 251 | 252 | 0 253 | 254 | 255 | 0 256 | 257 | 258 | 0 259 | 260 | 261 | 0 262 | 263 | 264 | 265 | 266 | 0 267 | 268 | 269 | 270 | 271 | 272 | 0 273 | 0 274 | 275 | 276 | 277 | 278 | 150 279 | 101 280 | 281 | 282 | 283 | 284 | 87 285 | 101 286 | 287 | 288 | 289 | QFrame::StyledPanel 290 | 291 | 292 | QFrame::Raised 293 | 294 | 295 | 296 | 297 | 298 | 系统: 0.00% 299 | 300 | 301 | Qt::AutoText 302 | 303 | 304 | 305 | 306 | 307 | 308 | Qt::Horizontal 309 | 310 | 311 | 312 | 313 | 314 | 315 | 用户: 0.00% 316 | 317 | 318 | 319 | 320 | 321 | 322 | Qt::Horizontal 323 | 324 | 325 | 326 | 327 | 328 | 329 | 空闲: 0.00% 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 0 341 | 0 342 | 343 | 344 | 345 | 346 | 160 347 | 101 348 | 349 | 350 | 351 | 352 | 160 353 | 101 354 | 355 | 356 | 357 | QFrame::StyledPanel 358 | 359 | 360 | QFrame::Raised 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 0 369 | 0 370 | 371 | 372 | 373 | 374 | 150 375 | 101 376 | 377 | 378 | 379 | 380 | 160 381 | 101 382 | 383 | 384 | 385 | QFrame::StyledPanel 386 | 387 | 388 | QFrame::Raised 389 | 390 | 391 | 392 | 6 393 | 394 | 395 | 9 396 | 397 | 398 | 9 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 总利用率: 0.0% 407 | 408 | 409 | 410 | 411 | 412 | 413 | QFrame::Sunken 414 | 415 | 416 | Qt::Horizontal 417 | 418 | 419 | 420 | 421 | 422 | 423 | 进程 424 | 425 | 426 | 427 | 428 | 429 | 430 | Qt::Horizontal 431 | 432 | 433 | 434 | 435 | 436 | 437 | 线程 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | Qt::Horizontal 453 | 454 | 455 | QSizePolicy::Minimum 456 | 457 | 458 | 459 | 40 460 | 20 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | Drawer 476 | QFrame 477 |
drawer.h
478 | 1 479 |
480 |
481 | 482 | 483 | 484 | 485 |
486 | -------------------------------------------------------------------------------- /mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | MainWindow::MainWindow(QWidget *parent) : 5 | QMainWindow(parent), 6 | ui(new Ui::MainWindow) 7 | { 8 | ui->setupUi(this); 9 | this->timer = new QTimer(this); 10 | this->cpu_model = new QStandardItemModel(); 11 | this->mem_model = new QStandardItemModel(); 12 | this->state = CPU; 13 | this->model = this->cpu_model; 14 | this->init_table(); 15 | ui->frame_center->add_data(0.1); 16 | process_map = new std::map(); 17 | username_dict = get_username_dict(); 18 | timer->start(2000); 19 | this->total_cpu_time = 0; 20 | this->total_idle_time = 0; 21 | this->last_pid = -1; 22 | this->num_processes = 0; 23 | get_cpu_stat(); 24 | get_process_info(0); 25 | connect(timer, SIGNAL(timeout()), this, SLOT(update_data())); 26 | } 27 | 28 | MainWindow::~MainWindow() 29 | { 30 | if (timer->isActive()) { 31 | timer->stop(); 32 | } 33 | delete timer; 34 | delete process_map; 35 | delete username_dict; 36 | delete cpu_model; 37 | delete mem_model; 38 | delete ui; 39 | } 40 | 41 | void MainWindow::update_data() 42 | { 43 | switch (state) { 44 | case CPU: 45 | get_cpu_stat(); 46 | break; 47 | 48 | case MEM: 49 | get_mem_stat(); 50 | break; 51 | 52 | default: 53 | break; 54 | } 55 | refocus(); 56 | } 57 | 58 | void MainWindow::get_cpu_stat() 59 | { 60 | std::ifstream input; 61 | input.open("/proc/stat", std::ios_base::in); 62 | int total_diff = 0; 63 | if (input.is_open()) { 64 | std::string cpu; 65 | int user, nice, system, idle, iowait, irq, softirq, stealstolen, guest; 66 | input >> cpu >> user >> nice >> system >> idle >> iowait >> irq >> softirq >> stealstolen >> guest; 67 | input.close(); 68 | int total_cpu_time = user + nice + system + idle + irq + softirq + guest + iowait + stealstolen; 69 | if (this->total_cpu_time != 0) { 70 | total_diff = total_cpu_time - this->total_cpu_time; 71 | int idle_diff = idle - this->total_idle_time; 72 | int user_diff = user - this->total_user_time; 73 | int sys_diff = system - this->total_sys_time; 74 | float total_rate = (total_diff - idle_diff) * 1.0 / total_diff; 75 | float idle_rate = idle_diff * 1.0 / total_diff; 76 | float user_rate = user_diff * 1.0 / total_diff; 77 | float sys_rate = sys_diff * 1.0 / total_diff; 78 | ui->left_1->setText(tr("系统:\t %1%").arg(QString::number(sys_rate * 100, 'f',2 ))); 79 | ui->left_2->setText(tr("用户:\t %1%").arg(QString::number(user_rate * 100, 'f', 2))); 80 | ui->left_3->setText(tr("空闲:\t %1%").arg(QString::number(idle_rate * 100, 'f', 2))); 81 | ui->right_1->setText(tr("总利用率: %1%").arg(QString::number(total_rate * 100, 'f', 1))); 82 | ui->right_1->setStyleSheet("QLabel {\n color:rgb(242, 21, 21)\n}"); 83 | ui->frame_center->add_data(total_rate); 84 | } 85 | this->total_cpu_time = total_cpu_time; 86 | this->total_idle_time = idle; 87 | this->total_sys_time = system; 88 | this->total_user_time = user; 89 | } 90 | else { 91 | qDebug() << "Cannot open file" << endl; 92 | } 93 | get_process_info(total_diff); 94 | } 95 | 96 | void MainWindow::get_mem_stat() 97 | { 98 | std::ifstream input; 99 | input.open("/proc/meminfo", std::ios_base::in); 100 | if (input.is_open()) { 101 | int mem_total, mem_free, mem_used, mem_cached; 102 | int swap_total, swap_free, swap_used; 103 | std::string tmp; 104 | char buffer[100]; 105 | int values[45]; 106 | int i = 0; 107 | while (i < 45) { 108 | input >> tmp >> values[i]; 109 | input.getline(buffer, 100); 110 | i++; 111 | } 112 | mem_total = values[0]; 113 | mem_free = values[1]; 114 | mem_used = mem_total - mem_free; 115 | mem_cached = values[4]; 116 | swap_total = values[14]; 117 | swap_free = values[15]; 118 | swap_used = swap_total - swap_free; 119 | float rate = mem_used * 100.0 / mem_total; 120 | this->mem_size = mem_total; 121 | ui->left_1->setText(tr("物理内存: %1").arg(get_proper_unit(mem_total).c_str())); 122 | ui->left_2->setText(tr("已使用内存: %1").arg(get_proper_unit(mem_used).c_str())); 123 | ui->left_3->setText(tr("可用内存: %1").arg(get_proper_unit(mem_free).c_str())); 124 | ui->right_1->setText(tr("总使用率: %1%").arg(QString::number(rate, 'f', 2))); 125 | ui->right_2->setText(tr("已缓存文件: %1").arg(get_proper_unit(mem_cached).c_str())); 126 | ui->right_3->setText(tr("已使用的交换: %1 KB").arg(swap_used)); 127 | ui->frame_center->add_data(rate / 100); 128 | input.close(); 129 | } 130 | get_process_info(0); 131 | } 132 | 133 | void MainWindow::get_process_info(int total_diff) 134 | { 135 | struct dirent *ptr; 136 | DIR *dir; 137 | std::ifstream input; 138 | dir = opendir("/proc"); 139 | int i = 0; 140 | int total_threads = 0; 141 | int cnt = 0; 142 | while((ptr = readdir(dir)) != NULL) { 143 | if (is_digit(ptr->d_name)) { 144 | // qDebug() << ptr->d_name << endl; 145 | model->setItem(i, 5, new QStandardItem(ptr->d_name)); 146 | model->item(i, 5)->setTextAlignment(Qt::AlignCenter); 147 | char filename[20] = "/proc/"; 148 | strcat(filename, ptr->d_name); 149 | input.open(strcat(filename, "/stat")); 150 | if (input.is_open()) { 151 | cnt++; 152 | std::string name; // process name 153 | int pid; // process id 154 | char state; // process state : "RSDZTW" 155 | int ppid, pgid, sid, tty_nr, tty_pgrp, flags, min_flt; 156 | int cmin_flt, maj_flt, cmaj_flt, priority, nice; 157 | long utime, stime, cutime, cstime; 158 | int num_threads, zero; 159 | unsigned long long start_time; 160 | input >> pid >> name >> state >> ppid >> pgid >> sid >> tty_nr \ 161 | >> tty_pgrp >> flags >> min_flt >> cmin_flt >> maj_flt \ 162 | >> cmaj_flt >> utime >> stime >> cutime >> cstime >> priority \ 163 | >> nice >> num_threads >> zero >> start_time; 164 | // discard the parentheses 165 | char* tmp = (char*)name.c_str(); 166 | int len = strlen(tmp); 167 | tmp[len - 1] = '\0'; 168 | model->setItem(i, 0, new QStandardItem(tmp+1)); 169 | // num threads 170 | if (this->state == CPU) { 171 | model->setItem(i, 3, new QStandardItem(QString::number(num_threads))); 172 | model->item(i, 3)->setTextAlignment(Qt::AlignCenter); 173 | } else { 174 | model->setItem(i, 4, new QStandardItem(QString::number(num_threads))); 175 | model->item(i, 4)->setTextAlignment(Qt::AlignCenter); 176 | } 177 | total_threads += num_threads; 178 | if (this->state == CPU) { 179 | // display process state 180 | switch (state) { 181 | case 'R': 182 | model->setItem(i, 4, new QStandardItem("运行")); 183 | break; 184 | case 'S': 185 | model->setItem(i, 4, new QStandardItem("休眠")); 186 | break; 187 | case 'D': 188 | model->setItem(i, 4, new QStandardItem("TASK_UNINTERRUPTIBLE")); 189 | break; 190 | case 'T': 191 | model->setItem(i, 4, new QStandardItem("停止")); 192 | break; 193 | case 'Z': 194 | model->setItem(i, 4, new QStandardItem("Zombie")); 195 | break; 196 | case 'W': 197 | model->setItem(i, 4, new QStandardItem("Paging")); 198 | break; 199 | default: 200 | break; 201 | } 202 | model->item(i, 4)->setTextAlignment(Qt::AlignCenter); 203 | 204 | // compute processes' CPU rate 205 | if (total_diff == 0) { 206 | model->setItem(i, 1, new QStandardItem("00.00%")); 207 | } else { 208 | int total_process = utime + stime + cutime + cstime; 209 | if (process_map->find(pid) != process_map->end()) { 210 | int total_pro_diff = total_process - (*process_map)[pid]; 211 | float rate = total_pro_diff * 8.0 / total_diff; 212 | QString temp = tr("%1%").arg(QString::number(rate * 100, 'f', 2)); 213 | if (temp.length() < 6) { 214 | temp = tr("0%1").arg(temp); 215 | } 216 | model->setItem(i, 1, new QStandardItem(temp)); 217 | 218 | } else { 219 | model->setItem(i, 1, new QStandardItem("00.00%")); 220 | } 221 | (*process_map)[pid] = total_process; 222 | } 223 | model->item(i, 1)->setTextAlignment(Qt::AlignCenter); 224 | // process runing time 225 | std::ifstream uptime; 226 | uptime.open("/proc/uptime"); 227 | if (uptime.is_open()) { 228 | float total_time; 229 | uptime >> total_time; 230 | start_time = (int)(total_time - start_time * 1.0 / CLK_TCK); 231 | // qDebug() << pid << "\t" << start_time << endl; 232 | QDateTime time = QDateTime::fromTime_t(start_time, Qt::UTC, -8 * 60 * 60); 233 | QString s_time = time.toString("hh:mm:ss"); 234 | model->setItem(i, 2, new QStandardItem(s_time)); 235 | uptime.close(); 236 | model->item(i, 2)->setTextAlignment(Qt::AlignCenter); 237 | } 238 | } 239 | input.close(); 240 | // username 241 | char filename2[20] = "/proc/"; 242 | strcat(filename2, ptr->d_name); 243 | std::ifstream input2; 244 | input2.open(strcat(filename2, "/status")); 245 | if (input2.is_open()) { 246 | int j = 0; 247 | char buffer[100]; 248 | while (j < 7) { 249 | j++; 250 | input2.getline(buffer, 100); 251 | } 252 | std::string s_uid; 253 | int uid; 254 | input2 >> s_uid >> uid; 255 | if (username_dict->find(uid) != username_dict->end()) { 256 | std::string user = (*username_dict)[uid]; 257 | //qDebug() << pid << "\t" << user.c_str(); 258 | model->setItem(i, 6, new QStandardItem(user.c_str())); 259 | } 260 | else { 261 | model->setItem(i, 6, new QStandardItem("nobody")); 262 | } 263 | model->item(i, 6)->setTextAlignment(Qt::AlignLeft); 264 | if (this->state == MEM) { 265 | j = 0; 266 | while (j < 9) { 267 | j++; 268 | input2.getline(buffer, 100); 269 | } 270 | std::string tmp; 271 | int vmsize, vmrss; 272 | input2 >> tmp >> vmsize; 273 | input2.getline(buffer, 100); 274 | input2.getline(buffer, 100); 275 | input2.getline(buffer, 100); 276 | input2.getline(buffer, 100); 277 | input2 >> tmp >> vmrss; 278 | float rate = vmrss * 100.0 / this->mem_size; 279 | QString temp = tr("%1%").arg(QString::number(rate, 'f', 2)); 280 | if (temp.length() < 6) { 281 | temp = tr("0%1").arg(temp); 282 | } 283 | model->setItem(i, 1, new QStandardItem(temp)); 284 | model->setItem(i, 2, new QStandardItem(get_proper_unit(vmsize).c_str())); 285 | model->setItem(i, 3, new QStandardItem(get_proper_unit(vmrss).c_str())); 286 | model->item(i, 1)->setTextAlignment(Qt::AlignCenter); 287 | //model->sort(1, Qt::DescendingOrder); 288 | } 289 | input2.close(); 290 | } else { 291 | qDebug() << tr("Cannot open status: %1!").arg(ptr->d_name) << endl; 292 | } 293 | } else { 294 | qDebug() << tr("Cannot open %1!").arg(ptr->d_name) << endl; 295 | i--; 296 | } 297 | i++; 298 | } 299 | } 300 | if (this->state == CPU) { 301 | ui->right_2->setText(tr("进程\t %1").arg(i)); 302 | ui->right_3->setText(tr("线程\t %1").arg(total_threads)); 303 | } 304 | model->sort(1, Qt::DescendingOrder); 305 | // qDebug() << "now: " << cnt << "last:" << this->num_processes << "rows:" << model->rowCount(); 306 | if (cnt < this->num_processes) { 307 | int diff= this->num_processes - cnt; 308 | model->removeRows(model->rowCount() - diff, diff); 309 | } 310 | this->num_processes = cnt; 311 | } 312 | 313 | void MainWindow::on_cpu_button_clicked() 314 | { 315 | ui->cpu_button->setEnabled(false); 316 | ui->mem_button->setEnabled(true); 317 | ui->mem_button->setStyleSheet("background-color:rgb(243,243,243);"); 318 | ui->cpu_button->setStyleSheet("background-color:rgb(108,107,108);color:rgb(255,254,250);"); 319 | this->state = CPU; 320 | init_table(); 321 | ui->left_1->setText(tr("系统:\t 0.00%")); 322 | ui->left_2->setText(tr("用户:\t 0.00%")); 323 | ui->left_3->setText(tr("空闲:\t 0.00%")); 324 | ui->right_1->setText(tr("总利用率: 0.0%")); 325 | ui->right_1->setStyleSheet("QLabel {\n color:rgb(242, 21, 21)\n}"); 326 | ui->frame_center->change_queue(); 327 | get_cpu_stat(); 328 | refocus(); 329 | } 330 | 331 | void MainWindow::on_mem_button_clicked() 332 | { 333 | ui->mem_button->setEnabled(false); 334 | ui->cpu_button->setStyleSheet("background-color:rgb(243,243,243);"); 335 | ui->cpu_button->setEnabled(true); 336 | ui->mem_button->setStyleSheet("background-color:rgb(108,107,108);color:rgb(255,254,250);"); 337 | this->state = MEM; 338 | init_table(); 339 | ui->left_1->setText(tr("物理内存: 00.00 GB")); 340 | ui->left_2->setText(tr("已使用内存: 00.00 GB")); 341 | ui->left_3->setText(tr("可用内存: 00.00 GB")); 342 | ui->right_1->setText(tr("总使用率: 0.0%")); 343 | ui->right_2->setText(tr("已缓存文件: 00.0 MB")); 344 | ui->right_3->setText(tr("已使用的交换: 00 KB")); 345 | ui->right_1->setStyleSheet("QLabel {\n color:rgb(242, 21, 21)\n}"); 346 | ui->frame_center->change_queue(); 347 | get_mem_stat(); 348 | refocus(); 349 | } 350 | 351 | void MainWindow::init_table() 352 | { 353 | // ui->tableView->setSortingEnabled(true); 354 | switch(state) { 355 | case CPU: 356 | model = this->cpu_model; 357 | ui->tableView->setModel(model); 358 | // ui->tableView->setModel(this->proxy_model); 359 | // ui->tableView->sortByColumn(1, Qt::DescendingOrder); 360 | model->setColumnCount(7); 361 | model->setHeaderData(0, Qt::Horizontal, "进程名称"); 362 | model->setHeaderData(1, Qt::Horizontal, " % CPU"); 363 | model->setHeaderData(2, Qt::Horizontal, " CPU时间"); 364 | model->setHeaderData(3, Qt::Horizontal, " 线程"); 365 | model->setHeaderData(4, Qt::Horizontal, "闲置唤醒"); 366 | model->setHeaderData(5, Qt::Horizontal, " PID"); 367 | model->setHeaderData(6, Qt::Horizontal, "用户"); 368 | ui->tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); 369 | model->sort(1, Qt::DescendingOrder); 370 | break; 371 | case MEM: 372 | model = this->mem_model; 373 | ui->tableView->setModel(model); 374 | model->setColumnCount(7); 375 | model->setHeaderData(0, Qt::Horizontal, "进程名称"); 376 | model->setHeaderData(1, Qt::Horizontal, " % MEM"); 377 | model->setHeaderData(2, Qt::Horizontal, "虚拟内存"); 378 | model->setHeaderData(3, Qt::Horizontal, "物理内存"); 379 | model->setHeaderData(4, Qt::Horizontal, " 线程"); 380 | model->setHeaderData(5, Qt::Horizontal, " PID"); 381 | model->setHeaderData(6, Qt::Horizontal, "用户"); 382 | ui->tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); 383 | model->sort(1, Qt::DescendingOrder); 384 | break; 385 | 386 | default: 387 | break; 388 | } 389 | ui->tableView->verticalHeader()->hide(); 390 | ui->tableView->setColumnWidth(0, 130); 391 | ui->tableView->horizontalHeader()->setStretchLastSection(true); 392 | } 393 | 394 | 395 | 396 | void MainWindow::on_tableView_clicked(const QModelIndex &index) 397 | { 398 | int row = index.row(); 399 | this->last_pid = model->item(row, 5)->text().toInt(); 400 | ui->pushButton_3->setEnabled(true); 401 | } 402 | 403 | void MainWindow::refocus() 404 | { 405 | if (last_pid == -1) { 406 | return; 407 | } 408 | for (int i = 0; i < model->rowCount(); i++) { 409 | if (model->item(i, 5)->text().toInt() == last_pid) { 410 | ui->tableView->setCurrentIndex(model->index(i, 0)); 411 | } 412 | } 413 | } 414 | 415 | void MainWindow::on_pushButton_3_clicked() 416 | { 417 | QMessageBox::StandardButton rb = QMessageBox::question(this, tr("温馨提示"), 418 | tr("您确定要退出此进程吗"), QMessageBox::Yes | QMessageBox::No); 419 | if (rb == QMessageBox::Yes && this->last_pid != -1) { 420 | kill(last_pid, SIGTERM); 421 | ui->pushButton_3->setEnabled(false); 422 | last_pid = -1; 423 | } 424 | } 425 | 426 | void MainWindow::on_pushButton_clicked() 427 | { 428 | Info_dialog info; 429 | info.exec(); 430 | } 431 | -------------------------------------------------------------------------------- /ActivityMonitor.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {e97806fd-d549-4861-8fbe-0f5e8b2319e1} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | true 41 | false 42 | 0 43 | true 44 | true 45 | 0 46 | 4 47 | true 48 | 1 49 | true 50 | true 51 | true 52 | false 53 | 54 | 55 | 56 | ProjectExplorer.Project.PluginSettings 57 | 58 | 59 | 60 | 61 | 62 | ProjectExplorer.Project.Target.0 63 | 64 | Desktop Qt 5.8.0 GCC 64bit 65 | Desktop Qt 5.8.0 GCC 64bit 66 | qt.58.gcc_64_kit 67 | 0 68 | 0 69 | 0 70 | 71 | /home/liuhe/build-ActivityMonitor-Desktop_Qt_5_8_0_GCC_64bit-Debug 72 | 73 | 74 | true 75 | qmake 76 | 77 | QtProjectManager.QMakeBuildStep 78 | true 79 | 80 | false 81 | false 82 | false 83 | 84 | 85 | true 86 | Make 87 | 88 | Qt4ProjectManager.MakeStep 89 | 90 | -w 91 | -r 92 | 93 | false 94 | 95 | 96 | 97 | 2 98 | Build 99 | 100 | ProjectExplorer.BuildSteps.Build 101 | 102 | 103 | 104 | true 105 | Make 106 | 107 | Qt4ProjectManager.MakeStep 108 | 109 | -w 110 | -r 111 | 112 | true 113 | clean 114 | 115 | 116 | 1 117 | Clean 118 | 119 | ProjectExplorer.BuildSteps.Clean 120 | 121 | 2 122 | false 123 | 124 | Debug 125 | 126 | Qt4ProjectManager.Qt4BuildConfiguration 127 | 2 128 | true 129 | 130 | 131 | /home/liuhe/build-ActivityMonitor-Desktop_Qt_5_8_0_GCC_64bit-Release 132 | 133 | 134 | true 135 | qmake 136 | 137 | QtProjectManager.QMakeBuildStep 138 | false 139 | 140 | false 141 | false 142 | false 143 | 144 | 145 | true 146 | Make 147 | 148 | Qt4ProjectManager.MakeStep 149 | 150 | -w 151 | -r 152 | 153 | false 154 | 155 | 156 | 157 | 2 158 | Build 159 | 160 | ProjectExplorer.BuildSteps.Build 161 | 162 | 163 | 164 | true 165 | Make 166 | 167 | Qt4ProjectManager.MakeStep 168 | 169 | -w 170 | -r 171 | 172 | true 173 | clean 174 | 175 | 176 | 1 177 | Clean 178 | 179 | ProjectExplorer.BuildSteps.Clean 180 | 181 | 2 182 | false 183 | 184 | Release 185 | 186 | Qt4ProjectManager.Qt4BuildConfiguration 187 | 0 188 | true 189 | 190 | 191 | /home/liuhe/build-ActivityMonitor-Desktop_Qt_5_8_0_GCC_64bit-Profile 192 | 193 | 194 | true 195 | qmake 196 | 197 | QtProjectManager.QMakeBuildStep 198 | true 199 | 200 | false 201 | true 202 | false 203 | 204 | 205 | true 206 | Make 207 | 208 | Qt4ProjectManager.MakeStep 209 | 210 | -w 211 | -r 212 | 213 | false 214 | 215 | 216 | 217 | 2 218 | Build 219 | 220 | ProjectExplorer.BuildSteps.Build 221 | 222 | 223 | 224 | true 225 | Make 226 | 227 | Qt4ProjectManager.MakeStep 228 | 229 | -w 230 | -r 231 | 232 | true 233 | clean 234 | 235 | 236 | 1 237 | Clean 238 | 239 | ProjectExplorer.BuildSteps.Clean 240 | 241 | 2 242 | false 243 | 244 | Profile 245 | 246 | Qt4ProjectManager.Qt4BuildConfiguration 247 | 0 248 | true 249 | 250 | 3 251 | 252 | 253 | 0 254 | Deploy 255 | 256 | ProjectExplorer.BuildSteps.Deploy 257 | 258 | 1 259 | Deploy locally 260 | 261 | ProjectExplorer.DefaultDeployConfiguration 262 | 263 | 1 264 | 265 | 266 | false 267 | false 268 | 1000 269 | 270 | true 271 | 272 | false 273 | false 274 | false 275 | false 276 | true 277 | 0.01 278 | 10 279 | true 280 | 1 281 | 25 282 | 283 | 1 284 | true 285 | false 286 | true 287 | valgrind 288 | 289 | 0 290 | 1 291 | 2 292 | 3 293 | 4 294 | 5 295 | 6 296 | 7 297 | 8 298 | 9 299 | 10 300 | 11 301 | 12 302 | 13 303 | 14 304 | 305 | 2 306 | 307 | ActivityMonitor 308 | 309 | Qt4ProjectManager.Qt4RunConfiguration:/home/liuhe/ActivityMonitor/ActivityMonitor.pro 310 | true 311 | 312 | ActivityMonitor.pro 313 | false 314 | 315 | /home/liuhe/build-ActivityMonitor-Desktop_Qt_5_8_0_GCC_64bit-Debug 316 | 3768 317 | false 318 | true 319 | false 320 | false 321 | true 322 | 323 | 1 324 | 325 | 326 | 327 | ProjectExplorer.Project.TargetCount 328 | 1 329 | 330 | 331 | ProjectExplorer.Project.Updater.FileVersion 332 | 18 333 | 334 | 335 | Version 336 | 18 337 | 338 | 339 | --------------------------------------------------------------------------------