• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

how do i get user_beancounters in a php script?

H

hubb

Guest
how do i read user_beancounters in a php script?

it's weird. i'm trying to write a php script that displays the user_beancounters on a web-page (not in shell).
but whatever i try, i don't get any content out of "cat /proc/user_beancounters".

at the same time "cat /proc/meminfo" works perfect. safe_mode is off. permissions for meminfo and user_beancounters are the same -r--r--r--

whats wrong here? please..... thanx!

here's the script:

PHP:
echo "beans:<br>\n";  
exec('/bin/cat /proc/user_beancounters', $beans, $ret1);  
var_dump ($beans); 
echo "<br>return: ". $ret1; 
echo "<br><br>meminfo:<br>\n"; 
exec('/bin/cat /proc/meminfo',$mem, $ret2); 
var_dump ($mem); 
echo "<br>return: ".$ret2;


here's the result:


beans:
array(0) { }
return: 0

meminfo:
array(22) { [0]=> string(25) "MemTotal: 2068292 kB" [1]=> string(25) "MemFree: 26996 kB" ........ }
return: 0
 
Hi,

I have the same problem. Did you find an answer?

Thanks a lot!
Christian
 
Back
Top