linux
qiukapi
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
gcc/g++ 编译 .cpp文件
贴一段代码 #include <iostream> using namespace std; struct Copyable { Copyable(){} Copyable(const Copyable &o) { cout << "Copied" << endl; } }; Copyable ReturnRValue() { ...原创 2020-03-25 15:13:28 · 1212 阅读 · 0 评论 -
linux 进程日志回滚 用脚本控制
这两天项目遇到一个问题,进程产生的log没有回滚机制,导致长时间运行后,存储被占满了,但是linux自带的回滚机制被裁减掉了,所以自己写了个脚本来控制进程的日志回滚 #!/bin/dash MAXLOGSIZE="10" LOGPATH=/tmp/log/ru_agent.log LOGNAME=ru_app.log while : do LOGSIZE=$(du -a $LOGPATH |...原创 2020-03-02 18:02:01 · 565 阅读 · 0 评论 -
linux 进程 内存使用监控
使用shell脚本来监控进程的内存使用情况 #!/bin/bash PROCESS=ru_app LOG="/mnt/app/ru/ru_app_mem.log" sleep 10 if [ -f "$LOG" ];then rm "$LOG" fi PID=$(ps | grep $PROCESS | grep -v 'grep' | awk '{print $1;}'...原创 2020-02-27 11:45:20 · 2025 阅读 · 0 评论 -
linux 制作静态动态链接库
静态库和动态库的区别:.so动态库,.a静态库 头文件myprint.h #ifndef __MY_PRINT_ #define __MY_PRINT_ #include <stdio.h> void print(); #endif 源文件 myprint.cpp #include "myprint.h" void print() { printf("make...原创 2019-06-08 15:34:44 · 216 阅读 · 0 评论
分享