2020年11月18日
摘要: 使用Grafana和Prometheus对Linux服务器性能进行监控,主要通过node_exporter进行监控,指标如 CPU、内存、磁盘等。Prometheus通过HTTP协议从远程的机器收集数据并存储Prometheus本地时序数据库。 一.监测服务器安装node_exporter linu 阅读全文
posted @ 2020-11-18 14:25 jiangger 阅读(228) 评论(0) 推荐(0) 编辑
  2020年4月21日
摘要: 一.创建maven工程 1.打开IDEA,选择file-->new project,选择maven,选择自己本地的JDK,点击next: 建好以后,默认有src->main->java、resourcel两个文件夹,以及pom.xml文件 二、在pom.xml文件中导入依赖包 <groupId>co 阅读全文
posted @ 2020-04-21 15:58 jiangger 阅读(1375) 评论(2) 推荐(3) 编辑
  2017年2月24日
摘要: //login.php <html><head></head><body><form action="insert.php" method="POST"><b>用户名:</b><input type="text" name="sname"> <br><br><b>密码:</b><input type 阅读全文
posted @ 2017-02-24 18:41 jiangger 阅读(99) 评论(0) 推荐(1) 编辑
摘要: <?php function checknum($num) { if($num >= 2) { throw new Exception("must below 2"); //抛出异常 } echo "ll <br>"; return true; } try //触发异常 { checknum(2); 阅读全文
posted @ 2017-02-24 18:37 jiangger 阅读(115) 评论(0) 推荐(1) 编辑
摘要: <?php class myexception extends Exception { public function errormessage() { $errmessage = "error :".$this->getline()." in ".$this->getfile()."<b> err 阅读全文
posted @ 2017-02-24 18:36 jiangger 阅读(104) 评论(0) 推荐(1) 编辑
摘要: <?php session_start(); $_SESSION["view"]=1;?><html><body><?php if(isset($_SESSION["view"])) { $_SESSION["view"]=$_SESSION["view"]+1; echo $_SESSION["v 阅读全文
posted @ 2017-02-24 18:35 jiangger 阅读(78) 评论(0) 推荐(1) 编辑
摘要: <?php setcookie("user","姜",time()+60);//设置cookie,并且有时间限制?><?php setcookie("user","jiangger",time()-3600);//删除cookie?> <html> <body> </html> </body> // 阅读全文
posted @ 2017-02-24 18:34 jiangger 阅读(64) 评论(0) 推荐(1) 编辑
摘要: <!DOCTYPE html><body><html> <?php //echo readfile("file.txt"); $fp=fopen("file.txt","x") or die("Unable to open file!");//fopen用于打开和创建文件 // echo fread 阅读全文
posted @ 2017-02-24 18:33 jiangger 阅读(128) 评论(0) 推荐(1) 编辑
摘要: <!DOCTYPE html><html><body><?php date_default_timezone_set("Asia/Shanghai");//设置时区 echo "今天是".date("Y/m/d/l")."<br>"; echo date("Y")."<br>"; echo date 阅读全文
posted @ 2017-02-24 18:32 jiangger 阅读(133) 评论(0) 推荐(1) 编辑
摘要: <html><body><form action = "upload2.php" method = "post" enctype="multipart/form-data"><label for="file">Filename:</label> <br><br> <input type="file" 阅读全文
posted @ 2017-02-24 18:31 jiangger 阅读(112) 评论(0) 推荐(1) 编辑