59 Commits

Author SHA1 Message Date
openeuler-ci-bot
ae43c83b8c
!58 [sync] PR-55: update vmtop download url
From: @openeuler-sync-bot 
Reviewed-by: @yezengruan 
Signed-off-by: @yezengruan
2022-11-24 06:06:48 +00:00
yezengruan
d25cab9dc5 update vmtop download url
The download url is dead and needs to be updated.

Signed-off-by: yezengruan <yezengruan@huawei.com>
(cherry picked from commit 3803cd48b8e5fe6d9142624b21d459b22d3d06ee)
2022-11-24 12:40:07 +08:00
openeuler-ci-bot
d9f0fb3264
!53 [sync] PR-52: 【轻量级 PR】:Unified license name specification
From: @openeuler-sync-bot 
Reviewed-by: @yezengruan 
Signed-off-by: @yezengruan
2022-10-09 03:16:31 +00:00
付善庆
72b130d277 Unified license name specification
Signed-off-by: 付善庆 <fushanqing@kylinos.cn>
(cherry picked from commit 84e98b2d278c96a085956199842c0f22d760fe31)
2022-10-09 11:04:57 +08:00
openeuler-ci-bot
ad30aaa030
!47 【轻量级PR】修正changelog中的错误日期
From: @konglidong 
Reviewed-by: @yezengruan 
Signed-off-by: @yezengruan
2022-06-15 09:26:04 +00:00
konglidong
36e9c6d659 modify bad date in changelog 2022-06-15 16:45:57 +08:00
openeuler-ci-bot
d4621c2e6a
!43 [sync] PR-41: add README.zh.md. update README.md
From: @openeuler-sync-bot 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-05 09:42:42 +00:00
yezengruan
c977d9dfb1 add README.zh.md. update README.md
Signed-off-by: gomico <smiku294@live.cn>
Signed-off-by: yezengruan <yezengruan@huawei.com>
(cherry picked from commit 021210523a19bb156ec21b021e20605f967ea140)
2022-05-05 15:33:13 +08:00
yezengruan
b6865b2eef update spec changelog
Signed-off-by: yezengruan <yezengruan@huawei.com>
(cherry picked from commit ecaf920edf4c57a22e39e4387e658ac8009654b7)
2022-05-05 15:33:13 +08:00
openeuler-ci-bot
40defc9dd1 !36 Automatically generate code patches with openeuler !20 !24
From: @zhendongchen
Reviewed-by: @zhanghailiang_lucky,@zhanghailiang_lucky
Signed-off-by: @zhanghailiang_lucky,@zhanghailiang_lucky
2021-04-25 17:10:52 +08:00
Alex Chen
aaefe9eaa0 spec: Update release version with !20 !24
increase release verison by one

Signed-off-by: Alex Chen <alex.chen@huawei.com>
2021-04-22 16:57:15 +08:00
Alex Chen
34f499dde0 spec: Update patch and changelog with !24
vcpu_list: pre malloc vcpu list to improve performance
performance: del unnecessary memcpy and memset
keyboard: change wait time to 3s
performance: change memset location
proc: del unused items getting from proc stat refresh
proc: del loop sscanf for proc pid stat file
utils: del realpath from read_file

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
ec90fc1e17 utils: del realpath from read_file
Since the path in read_file is constructed by vmtop, there is no need
to use realpath to modify the path. So, del realpath to release cpu time.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
6c00a8de63 proc: del loop sscanf for proc pid stat file
Loop sscanf and strtok will take a long cpu time, since
get_proc_stat is called per thread. So, replace these with a single sscanf,
which will save much cpu time.
Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
13badcdda8 proc: del unused items getting from proc stat refresh
Currently, vmtop gets a lot of items from /proc/pid/stat, and there
are many unused data in these items, which will add a lot of cpu usage.
So, del these item's getting process.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
2306ad24de performance: change memset location
There is no need to clear all mem in add_domains, beacause memcpy will
write the front section. We only need to clear the mem in the end, which
will improve the performance.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
47557de587 keyboard: change wait time to 3s
Currently, key wait time is 1s, which is too short to display vm-exit status.
So, change it to 3s.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
fea85e8fb5 performance: del unnecessary memcpy and memset
There is no need to malloc a new mem to save old domain list data,
and now->domains and pre->domains are pointers.
So assign now->domains to pre->domains satisfies the requirement.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Huawei Technologies Co., Ltd
1f664abbd5 vcpu_list: pre malloc vcpu list to improve performance
It costs a lot of time to malloc and memset vcpu_list while getting a new vcpu.
And vcpu num is limited to MAX_VCPU_NUM = 1024, so pre malloc MAX_VCPU_NUM mem,
which will improve vmtop cpu usage a lot.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:11 +08:00
Alex Chen
03b8e2075d spec: Update patch and changelog with !20
input: change wait mechanism for input

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:10 +08:00
Huawei Technologies Co., Ltd
0a9bc10b52 input: change wait mechanism for input
Currently, vmtop uses halfdelay to set waiting timeout of input.
But, halfdelay's timeout can only be between 1~255, which limits vmtop's
functioniing.

Signed-off-by: nocjj <1250062498@qq.com>
2021-04-22 16:57:10 +08:00
openeuler-ci-bot
4b767cdd06 !31 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-03-02 21:35:20 +08:00
Euler Robot
c8657ee99d spec: Update release version with !21 !22
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-03-02 16:57:22 +08:00
Euler Robot
4a64e95873 spec: Update patch and changelog with !22
version: unified with release version

Signed-off-by: nocjj <1250062498@qq.com>
2021-03-02 16:57:22 +08:00
Huawei Technologies Co., Ltd
228dea6049 version: unified with release version
Currently, vmtop release version has been update to 1.1, but
version in configure.ac is still 1.0. So, update release
version to configure.ac.

Signed-off-by: nocjj <1250062498@qq.com>
2021-03-02 16:57:22 +08:00
Euler Robot
a9aa9bb3a2 spec: Update patch and changelog with !21
input: add invalid opt check in input

Signed-off-by: nocjj <1250062498@qq.com>
2021-03-02 16:57:22 +08:00
Huawei Technologies Co., Ltd
0d1c6716a6 input: add invalid opt check in input
Add invalid opt check while vmtop start with opts.

Signed-off-by: nocjj <1250062498@qq.com>
2021-03-02 16:57:22 +08:00
openeuler-ci-bot
89a7f1b22c !25 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-02-26 14:45:21 +08:00
Euler Robot
1cd295767c spec: Update release version with !15
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-22 10:46:40 +08:00
Euler Robot
d98b10d811 spec: Update patch and changelog with !15
bugfix: add check to avoid invalid ptr for strcmp
2021-01-22 10:46:40 +08:00
Huawei Technologies Co., Ltd
7ae005e784 bugfix: add check to avoid invalid ptr for strcmp
If len of d_name is less than "pid", it will pass a invalid ptr
to strcmp, which will cause crash.
2021-01-22 10:46:40 +08:00
openeuler-ci-bot
cce2a51d6b !21 sync patched from openeuler
From: @nocjj
Reviewed-by: @zhendongchen
Signed-off-by: @zhendongchen
2021-01-15 21:24:28 +08:00
nocjj
161f0e3ae7 sync code from openeuler:vmtop and update release to 2 2021-01-14 15:27:15 +08:00
openeuler-ci-bot
31f67fb95c !14 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-12-08 17:31:47 +08:00
Euler Robot
f0ff966f85 spec: Update release version with !8 !9
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-11-06 11:58:09 +08:00
Euler Robot
96a45fe887 spec: Update patch and changelog with !9
display: modify filter display to support more display fields items

Signed-off-by: Jiajun Chen <1250062498@qq.com>
2020-11-06 11:58:09 +08:00
Huawei Technologies Co., Ltd
742bb54154 display: modify filter display to support more display fields items
If display fields items is more than screen rows, some of fields items
can't be displayed in screen.
So, start another col to show fields items if screen can't show all content in one col.

Signed-off-by: Jiajun Chen <1250062498@qq.com>
2020-11-06 11:58:09 +08:00
Euler Robot
1c229a797b spec: Update patch and changelog with !8
vcpu_stat: add remaining kvm exits items to display

Signed-off-by: Jiajun Chen <1250062498@qq.com>
2020-11-06 11:58:08 +08:00
Huawei Technologies Co., Ltd
6c36fdc07c vcpu_stat: add remaining kvm exits items to display
Add remaining kvm exits items to display, include:
EXTerr, EXTukn, EXTcp153, EXTcp156, EXTcp14m,
EXTcp14l, EXTcp146, EXTsmc, EXTsve, EXTdbg, EXTfail

Set dafault width to 10 space, and set these items default hidden.

Signed-off-by: Jiajun Chen <1250062498@qq.com>
2020-11-06 11:58:08 +08:00
openeuler-ci-bot
5c4be98493 !13 spec: modify source url
From: @nocjj
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-10-12 16:50:02 +08:00
Fei Xu
91f976875d spec: modify source url
Change source url to openeuler repo, and replace tar with
openeuler/vmtop tag v1.1(which is same as v1.0.1):
wget -O vmtop-1.1.tar.gz https://gitee.com/openeuler/vmtop/repository/
archive/v1.1.tar.gz#/vmtop-1.1.tar.gz
2020-10-10 15:51:15 +08:00
openeuler-ci-bot
a8ce39272f !12 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang,@yorifang,@yorifang
2020-10-10 14:17:07 +08:00
Euler Robot
0654c4697a spec: Update release version with !7
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-09-28 11:57:52 +08:00
Euler Robot
b640dfbebc spec: Update patch and changelog with !7
vcpustat: modify vcpu info acquirement from debugfs
display: expand %CPU display
display: add limit to usage display
vmtop: simplify print_domain_field
2020-09-28 11:57:52 +08:00
nocjj
6535f799a3 vmtop: simplify print_domain_field
Use array to simplify print_domain_field.
2020-09-28 11:57:52 +08:00
nocjj
c37096d834 display: add limit to usage display
Because of time accuracy, the usage sometime may be more than vcpu nums.
This is a matter of precision, so add limit to these usage.
2020-09-28 11:57:52 +08:00
nocjj
be522b3b23 display: expand %CPU display
Now, %CPU's align is 6, and is not enough to display VM
that has vcpus more than 10. So expand align to 8.
2020-09-28 11:57:52 +08:00
nocjj
d8f7c63405 vcpustat: modify vcpu info acquirement from debugfs
Previous judgement to determine whether the vcpustat info matches the process is:
strstr(buf, pid) == buf + 1
But there is an exception that the kvm exit times may contain process pid string.
And then, we will calculate the delta between two defferent process.
So, modify this judgement codition.
2020-09-28 11:57:52 +08:00
openeuler-ci-bot
8ee1001f41 !10 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-09-22 20:49:30 +08:00
Euler Robot
57654a9e1f spec: Update release version with !6
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-09-22 20:18:55 +08:00