logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

linux 命令之ifstat

ifstat命令用于查看网络流量ifstat系统没有默认安装,需要使用apt-get命令安装,或者下载源码安装Ifstat源码下载地址安装说明1.使用apt-get安装apt-get install ifstat下载源码安装wgethttp://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gztar xvf i

linux c 获取当前运行进程总数

获取当前运行进程总数的命令为: ps auxw | wc -l获取当前运行进程总数的源码如下:#include <stdio.h>#include <stdlib.h>#include <dirent.h>#include <string.h>#include <ctype.h>#include <errno.h>int main(int argc, char *argv[]){

linux c获取系统启动时间

sysinfo 函数原型int sysinfo(struct sysinfo *info);##获取系统相关信息结构体sysinfo 结构体说明struct sysinfo {long uptime;/* 启动到现在经过的时间 */unsigned long loads[3];/* 1 , 5, 15 分的系统负载*/unsigne

linux 开启制作无线路由器(ubuntu 1404)

确定笔记本网卡支持 master 模式执行 iw list 命令,执行结果中有下面的内容,说明这张网卡是支持做 ap 路由的(APAP/VLAN) Supported interface modes:* IBSS* managed* AP* AP/VLAN* WDS* monitor* mesh point* P

#linux#ubuntu
linux shell 脚本中创建对话框 (whiptail 工具)

在终端环境下安装新的软件时,可以经常看到信息对话框弹出。对话框的类型有密码箱,检查表,菜单,等等。 whiptail 可以在 shell 脚本中创建基于终端的对话框,消息框的过程,类似于 Zenity 或 xdialog GUI 脚本代码。whiptail 语法whiptail[--titletitle][ --backtitle backtitle ] [ --c

linux C 实现重定向

在 Linux 系统中,每个进程都有 STDIN 、STDOUT 和 STDERR 这 3 种标准 I/O 。它们是程序最通用的输入输出方式。每个进程都会维护一个文件描述符表(FILE  DESCRIPTOR  TABLE),用以定位被打开的文件。表中的记录(文件描述符)是一个索引值,指向内核为每一个进程所维护的该进程打开文件的记录表。在进程创建时,内核为进程默认创建了0、1、2三个特殊的FD

linux /proc/stat 文件说明

/proc/stat 文件内容# cat /proc/statcpu1411 1322 3070 1193539 2790 0 268 0 0 0cpu0 472 658 787 297933 695 0 19 0 0 0cpu1 314 157 728 299238 170 0 1 0 0 0cpu2 322 441 1069 296914 1727 0 246 0 0 0cpu3

linux c statfs系统调用

statfs 系统调用原型:int statfs(const char *path, struct statfs *buf);参数说明:path : 位于需要查询信息的文件系统的路径名(不是设备名,是挂载点名称)buf : statfs结构体的指针变量,用于储存文件系统相关的信息。statfs结构体说明结构体原型:#if __WORDSIZE == 32/* System w

linux 通过命令行获取本机外网IP

curl ifconfig.mecurl icanhazip.comcurl ident.mecurl whatismyip.akamai.comcurl tnx.nl/ipcurl myip.dnsomatic.com

linux c 获取网卡状态(UP or DOWN)

源码如下:#include <sys/socket.h>#include <sys/ioctl.h>#include <linux/if.h>#include <string.h>#include <stdio.h>char *net_detect(char* net_name){int skfd = 0;struct ifreq ifr;

    共 30 条
  • 1
  • 2
  • 3
  • 请选择