Skip to content

Commit 73dcb0d

Browse files
committed
Restore failed rebase
1 parent 7539a16 commit 73dcb0d

File tree

30 files changed

+146
-433
lines changed

30 files changed

+146
-433
lines changed

.devilbox/etc/mariadb-10.3/.keepme

Whitespace-only changes.

.devilbox/etc/mariadb-5.5/.keepme

Whitespace-only changes.

.devilbox/etc/mysql-5.5/.keepme

Whitespace-only changes.

.devilbox/etc/mysql-5.6/.keepme

Whitespace-only changes.

.devilbox/etc/mysql-5.7/.keepme

Whitespace-only changes.

.devilbox/etc/mysql-8.0/.keepme

Whitespace-only changes.

.devilbox/etc/mysql-8.0/charset.cnf

Lines changed: 0 additions & 10 deletions
This file was deleted.

.devilbox/www/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
1414

1515

16-
$DEVILBOX_VERSION = 'v0.15';
17-
$DEVILBOX_DATE = '2019-02-27';
16+
$DEVILBOX_VERSION = 'v1.0.0-alpha1';
17+
$DEVILBOX_DATE = '2019-02-28';
1818
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
1919

2020
//

.devilbox/www/htdocs/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,14 +679,14 @@
679679
<?php if ($avail_mysql): ?>
680680
<tr>
681681
<th>mysql</th>
682-
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_MYSQL_DATADIR').'/'.loadClass('Helper')->getEnv('MYSQL_SERVER'); ?></td>
682+
<td>Docker volume</td>
683683
<td>/var/lib/mysql</td>
684684
</tr>
685685
<?php endif; ?>
686686
<?php if ($avail_pgsql): ?>
687687
<tr>
688688
<th>pgsql</th>
689-
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_PGSQL_DATADIR').'/'.loadClass('Helper')->getEnv('PGSQL_SERVER'); ?></td>
689+
<td>Docker volume</td>
690690
<td>/var/lib/postgresql/data/pgdata</td>
691691
</tr>
692692
<?php endif; ?>
@@ -707,7 +707,7 @@
707707
<?php if ($avail_mongo): ?>
708708
<tr>
709709
<th>mongo</th>
710-
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_MONGO_DATADIR'); ?></td>
710+
<td>Docker volume</td>
711711
<td>/data/db</td>
712712
</tr>
713713
<?php endif; ?>

.devilbox/www/include/lib/container/Memcd.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,25 @@ public function getKeys()
114114
// Memcached >= 1.5
115115
for ($i=0; $i<$cli_retries; $i++) {
116116

117+
// Get item number to trigger with stats cachedump
117118
$output = array();
118-
exec('printf "stats cachedump 1 0\nquit\n" | nc memcd 11211 | grep -E \'^ITEM\'', $output);
119+
exec('printf "stats items\nquit\n" | nc memcd 11211 | grep -E \'items:[0-9]+:number\s[0-9]+\'', $output);
120+
$num1 = 1;
121+
$num2 = 0;
122+
if (isset($output[0])) {
123+
$matches = array();
124+
preg_match('/items:([0-9]+):number\s([0-9]+)/', $output[0], $matches);
125+
if (isset($matches[1])) {
126+
$num1 = $matches[1];
127+
}
128+
if (isset($matches[2])) {
129+
$num2 = $matches[2];
130+
}
131+
}
132+
133+
// Trigger stats cachedump on item number
134+
$output = array();
135+
exec('printf "stats cachedump '.$num1.' '.$num2.' \nquit\n" | nc memcd 11211 | grep -E \'^ITEM\'', $output);
119136
foreach ($output as $line) {
120137
$matches = array();
121138
preg_match('/(^ITEM)\s*(.+?)\s*\[([0-9]+\s*b);\s*([0-9]+\s*s)\s*\]/', $line, $matches);

0 commit comments

Comments
 (0)