show inode monitor per cpanel


Status
Not open for further replies.

hostnic.id

Hosting Guru
Verified Provider
halloo

ada yang tau untuk memunculkan inode monitor dan proses monitor per account cpanel?? pasti sudah taukan dengan fitur cpanelnya dari hostgator.

maaf belum kasi screen shot
 

galuh82

Hosting Guru
Verified Provider
maksudnya kayak LVE di cloudlinux atau gimana ?
sorry belum coba hostgator jadi nggak tau heee, btw nice info kalo bisa implementasi
 

Bforce

Hosting Guru
Bila hanya ingin menampilkan inodes masing2 user di cpanel, bisa coba prosedur di bawah.

NB: Resiko tanggung sendiri. Sudah lupa link asalnya, tapi pernah saya coba. Update cpanel mungkin akan menghapus perubahan ini dan perlu diulangi.

1) Ganti prioritas Apache ke .PHP di:
WHM: Main >> Service Configuration >> Apache Configuration >> DirectoryIndex Priority

2) Copy /usr/local/cpanel/base/frontend/x3/index.html
ke /usr/local/cpanel/base/frontend/x3/index.php

3) Tambahkan kode PHP (biru) ke /usr/local/cpanel/base/frontend/x3/branding/index.html

Code:
		<cpanelif !$CPDATA{'DEMO'}>
			<tr class="row-<?cp StatsBar::rowcounter(%,rowtype) rowcounter=mainstats ?>">
				<td class="stats_left"><cpanel langprint="frontend-lastlogin"></td>
				<td class="stats_right"><cpanel LastLogin="lastlogin(1)">&nbsp;</td>
			</tr>
		</cpanelif>
[B][COLOR="royalblue"]		<tr class="row-<?cp StatsBar::rowcounter(%,rowtype) rowcounter=mainstats ?>">
			<td class="stats_left"><cpanel langprint="Total Files (Inodes)"></td>
			<td class="stats_right">
<?php
echo exec("/usr/bin/quota -u <cpanel print="$user"> | /bin/awk '{ if ( $5 ~ /^[0-9]/) total+=$5 } END {print total}'");
?>
      </td>
		</tr>
[/COLOR][/B]		<?cp StatsBar::stat(
			[tr class="row-%"]

4) Harus merubah link ke "home" (layar cpanel kiri-atas)
File: /usr/local/cpanel/base/frontend/x3/branding/stdmheader.html

Code:
<a style="display:block; width: 100%; height: 100%; text-decoration:none" target="_top" href="[B][COLOR="red"]<cpanel printvar="dprefix">index.html[/COLOR][/B]">&nbsp;</a>

Warna merah ganti ke > /

5) Harus merubah link ke "home" (layar cpanel bagian footer/bawah)
File: /usr/local/cpanel/base/frontend/x3/branding/stdfooter.html

Code:
<li class="footer_li"><a class="footer_li_a bottomlink" href="[COLOR="red"][B]<cpanel printvar="dprefix">index.html[/B][/COLOR]"><cpanel langprint="NavHome"></a></li>

Warna merah ganti ke > /
 

galuh82

Hosting Guru
Verified Provider
ada screenshoot nya nggak ya untuk tampilan cpanel setelah proses diatas ?

trims
 

hostnic.id

Hosting Guru
Verified Provider
sayangnya setelah di coba inodes tidak nampak, hanya tulisan Total Files (Inodes) ini saja

PHP:
<?php
  echo "<b>";
  system('pwd');
  echo "</b>: ";
  system('find . | wc -l');
  echo " inodes<br />\n<b>";
  system('cd ~/public_html; pwd');
  echo "</b>: ";
  system('cd ~/public_html; find . | wc -l');
  echo " inodes<br />\n<b>";
  system('cd ~; pwd');
  echo "</b>: ";
  system('cd ~; find . | wc -l');
  echo " inodes";
?>

ini salah satu script untuk memunculkan inodes
 
Status
Not open for further replies.

Top