Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
op
plugin
Commits
da005429
Commit
da005429
authored
Apr 25, 2020
by
feilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
f47262b2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
30_redis.sh
30_redis.sh
+1
-0
60_linux_cpu.py
60_linux_cpu.py
+3
-0
No files found.
30_redis.sh
View file @
da005429
...
...
@@ -65,6 +65,7 @@ Push_n9e(){
Test_alive
(){
r
=
$(
$redis_cli_cmd
-h
$ip
-p
$port
ping 2>/dev/null
)
&&
value
=
0
||
value
=
1
Json_join redis.alive
$value
"port=
$port
"
$countertype
[
$value
-eq
1
]
&&
return
$value
[
"X
$r
"
==
'XPONG'
]
&&
value
=
0
||
value
=
1
Json_join redis.auth_passwd
$value
"port=
$port
"
$countertype
return
$value
...
...
60_linux_cpu.py
View file @
da005429
...
...
@@ -45,4 +45,7 @@ if __name__ == "__main__":
sys
.
stderr
.
write
(
'cannot get local ip'
)
sys
.
exit
(
0
)
core_total
=
int
(
os
.
popen
(
"cat /proc/cpuinfo | grep processor | tail -1 | cut -d' ' -f2"
)
.
read
()
.
strip
())
+
1
if
core_total
<=
8
:
print
(
json
.
dumps
(
get_cpu_core_stat
(
core_total
)))
else
:
print
(
'[]'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment