Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
ab6f07f8
Commit
ab6f07f8
authored
Dec 02, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get eyesis4pi free space
parent
26c65284
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
eyesis4pi_interface.php
src/eyesis4pi/eyesis4pi_interface.php
+19
-0
No files found.
src/eyesis4pi/eyesis4pi_interface.php
View file @
ab6f07f8
...
...
@@ -39,6 +39,25 @@ switch($cmd){
die
(
symlink
(
$mountpoint
,
$symlink
));
break
;
case
"free_space"
:
//sda1
if
(
is_dir
(
$mountpoint
))
$sda1
=
round
(
disk_free_space
(
$mountpoint
)
/
1024
/
1024
/
1024
,
2
);
//sda2
if
(
!
is_file
(
$camogmdisk
)){
$devices
=
get_raw_dev
();
foreach
(
$devices
as
$device
=>
$size
){
//size in MB
if
(
$device
==
"/dev/sda2"
)
$sda2
=
round
(
$size
/
1048576
,
2
);
}
}
else
{
//read camogm.disk file
$sda2
=
10
;
}
respond_xml
(
"
{
$sda1
}
G
{
$sda2
}
G"
);
break
;
case
"free_space_bkp"
:
// results are in GB
// /dev/sda2 is not a mountpoint but a device because it does not have a file system
$res
=
0
;
...
...
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