Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
monitoring
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cylab
monitoring
Commits
b64424df
Commit
b64424df
authored
6 years ago
by
Tibo
Browse files
Options
Downloads
Patches
Plain Diff
Support nfs
parent
6affd7f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
web/app/Sensor/Disks.php
+1
-1
1 addition, 1 deletion
web/app/Sensor/Disks.php
web/app/Sensor/Inodes.php
+1
-1
1 addition, 1 deletion
web/app/Sensor/Inodes.php
web/tests/Unit/ExampleTest.php
+3
-3
3 additions, 3 deletions
web/tests/Unit/ExampleTest.php
web/tests/Unit/df
+1
-0
1 addition, 0 deletions
web/tests/Unit/df
with
6 additions
and
5 deletions
web/app/Sensor/Disks.php
+
1
−
1
View file @
b64424df
...
...
@@ -15,7 +15,7 @@ namespace App\Sensor;
*/
class
Disks
extends
\App\AbstractSensor
{
const
REGEXP
=
"/
\\
n([A-z\/0-9
\\
-
\\
.]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)%\s*([A-z\/0-9]+)/"
;
const
REGEXP
=
"/
\\
n([A-z\/0-9
:
\\
-
\\
.]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)%\s*([A-z\/0-9]+)/"
;
public
function
report
()
{
$record
=
$this
->
getLastRecord
(
"disks"
);
...
...
This diff is collapsed.
Click to expand it.
web/app/Sensor/Inodes.php
+
1
−
1
View file @
b64424df
...
...
@@ -9,7 +9,7 @@ namespace App\Sensor;
*/
class
Inodes
extends
\App\AbstractSensor
{
const
REGEXP
=
"/
\\
n([A-z\/0-9
\\
-
\\
.]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)%\s*([A-z\/0-9]+)/"
;
const
REGEXP
=
"/
\\
n([A-z\/0-9
:
\\
-
\\
.]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)\s*([0-9]+)%\s*([A-z\/0-9]+)/"
;
public
function
report
()
{
$record
=
$this
->
getLastRecord
(
"inodes"
);
...
...
This diff is collapsed.
Click to expand it.
web/tests/Unit/ExampleTest.php
+
3
−
3
View file @
b64424df
...
...
@@ -43,9 +43,9 @@ class ExampleTest extends TestCase
$string
=
file_get_contents
(
__DIR__
.
"/df"
);
$sensor
=
new
Disks
(
new
\App\Server
());
$disks
=
$sensor
->
parse
(
$string
);
$this
->
assertEquals
(
7
,
count
(
$disks
));
$this
->
assertEquals
(
"/dev/sda1"
,
$disks
[
2
]
->
filesystem
);
$this
->
assertEquals
(
1128926648
,
$disks
[
2
]
->
blocks
);
$this
->
assertEquals
(
3
,
count
(
$disks
));
$this
->
assertEquals
(
"/dev/sda1"
,
$disks
[
1
]
->
filesystem
);
$this
->
assertEquals
(
1128926648
,
$disks
[
1
]
->
blocks
);
}
public
function
testUpdates
()
{
...
...
This diff is collapsed.
Click to expand it.
web/tests/Unit/df
+
1
−
0
View file @
b64424df
...
...
@@ -6,3 +6,4 @@ tmpfs 12258572 4 12258568 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 12258572 0 12258572 0% /sys/fs/cgroup
tmpfs 2451716 0 2451716 0% /run/user/1000
172.20.0.4:/srv/nfs/cylab03 1729930240 94934016 1547097088 6% /mnt/nfs
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment