( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0007416504{main}( ).../index.php:0
20.07804703416Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.404817176320Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.405017176376Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.405017176752Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.405017176752Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.405217176848Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.405617216768require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.409817514040GKTemplate->__construct( ).../component.php:31
100.416717698424GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.417317743280require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0007416504{main}( ).../index.php:0
20.07804703416Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.404817176320Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.405017176376Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.405017176752Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.405017176752Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.405217176848Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.405617216768require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.409817514040GKTemplate->__construct( ).../component.php:31
100.419017871608GKTemplateMenu->getMenuType( ).../gk.framework.php:85
pptpd PPP VPN LOG
Logo
Print this page

pptpd PPP VPN LOG

vpn 服务,但通过last查看的时候,只有登录的IP信息,

 
无法查看VPN客户端登录的用户名,登录地址,断开时间等信息。
 
请同事写了两个脚本。用于记录登录信息及登出信息。记一下,以备后用
 
修改ip-up ,ip-down文件,增加以下内容(export PATH 行后面),将日志信息记录到
/var/log/pptpd.log文件 中
 
vim /etc/ppp/ip-up 

echo "" >> /var/log/pptpd.log 
echo "IP UP        \ 
    `date -d today +%F_%T`        \ 
$6        \ 
$PEERNAME        \ 
$1        \ 
$5" >> /var/log/pptpd.log
 
vim /etc/ppp/ip-down文件。ip-down写入pptpd.log与最后一个 ip-up进行配对,以方便查看
 
 

 

tac /var/log/pptpd.log | while read line 
do 
        _tmphead=$(echo $line | cut -d" " -f1,2) 
        _tmptime=$(echo $line | cut -d" " -f3) 
        _tmpuser=$(echo $line | cut -d" " -f5) 
        if [ "IP UP" = "$_tmphead" -a "$PEERNAME" = "$_tmpuser" ] 
        then 
                _rep_line="$line" 
                sed -i "s/$line/$_rep_line\nIP DOWN        \ 
`date -d today +%F_%T`        \ 
$6        \ 
$PEERNAME        \ 
$1        \ 
$5/" /var/log/pptpd.log 
                break 
        fi 
done

Last modified onSaturday, 05 January 2013 10:06

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0007416504{main}( ).../index.php:0
20.07804703416Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.07804703416Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.284912431776Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.285512456120Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.286212511448Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.286512540272require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.295012975680K2ControllerItem->execute( ).../k2.php:64
90.295012975680K2ControllerItem->display( ).../BaseController.php:710
100.305513700880K2ControllerItem->display( ).../item.php:78
110.305513700880K2ControllerItem->display( ).../controller.php:19
120.310114097248Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.313914117616K2ViewItem->display( ).../ViewController.php:102
140.392417085896K2ViewItem->display( ).../view.html.php:742
150.392417085896K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.397817266096include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in VPN
  • Read 3126 times

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0007416504{main}( ).../index.php:0
20.07804703416Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.07804703416Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.284912431776Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.285512456120Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.286212511448Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.286512540272require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.295012975680K2ControllerItem->execute( ).../k2.php:64
90.295012975680K2ControllerItem->display( ).../BaseController.php:710
100.305513700880K2ControllerItem->display( ).../item.php:78
110.305513700880K2ControllerItem->display( ).../controller.php:19
120.310114097248Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.313914117616K2ViewItem->display( ).../ViewController.php:102
140.392417085896K2ViewItem->display( ).../view.html.php:742
150.392417085896K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.397817266096include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.