小记
笔记
ARM背板
继电器:
https://zhidao.baidu.com/question/16404775.html
有关获取ARM相关属性
淘到宝了,这里有篇博客讲的
获取操作系统、CPU、内存信息、硬盘、IP和MAC、进程信息(windows和linux):
https://blog.csdn.net/u012234115/article/details/71056957?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase
获取用户名下所有的在跑的进程
获取网口占用情况
这里有篇相仿的博客:
https://blog.csdn.net/mociml/article/details/4955487
这里先对网口
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <errno.h>
#include <net/if.h>
/*检测网口是否连接网线*/
/*
Link eth0 detected: no 没有连线
Link eth1 detected: no 没有连线
Link eth2 detected: yes 已连线
Link eth3 detected: no 没有连线
*/
struct ethtool_value
{
__uint32_t cmd;
__uint32_t data;
};
int main(int argc, char* argv[])
{
struct ethtool_value edata;
int fd = -1, err = 0;
struct ifreq ifr;
int i = 0;
for(i = 0; i< 4; i++)
{
memset(&ifr, 0, sizeof(ifr));
sprintf(ifr.ifr_name, "eth%d",i);
//strcpy(ifr.ifr_name, "eth0");
//strcpy(ifr.ifr_name, argv[1]);
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd < 0)
{
perror("Cannot get control socket");
return 70;
}
edata.cmd = 0x0000000a;
ifr.ifr_data = (caddr_t)&edata;
err = ioctl(fd, 0x8946, &ifr);
if (err == 0)
{
fprintf(stdout, "Link detected: %s\n",
edata.data ? "yes":"no");
}
else if (errno != EOPNOTSUPP)
{
perror("Cannot get link status\n");
}
}
return 0;
}
ifreq结构体的相关介绍:
https://www.cnblogs.com/landy-weiai/p/3752665.html
Linux下的ioctl()函数详解(挺不错的博客,值得反复查看):
https://www.cnblogs.com/tdyizhen1314/p/4896689.html
ifreq,用来配置ip地址,激活接口,配置MTU等接口信息的。其中包含了一个接口的名字和具体内容——(是个共用体,有可能是IP地址,广播地址,子网掩码,MAC号,MTU或其他内容)。ifreq包含在ifconf结构中。而ifconf结构通常是用来保存所有接口的信息的。
printf,sprintf,fprintf以及stderr和stdout的区别:
https://www.cnblogs.com/mydomain/p/9817320.html
页面部分
有关HTML5拖拽的东西:
https://www.runoob.com/html/html5-draganddrop.html
设置取消拖拽:
draggable="true"