首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Linux smart_linux安装smartctl

    Smartmontools是一种硬盘检测工具,通过控制和管理硬盘的SMART(Self Monitoring Analysis and Reporting Technology),自动检测分析及报告技术)技术来实现的,SMART技术可以对硬盘的磁头单元、盘片电机驱动系统、硬盘内部电路以及盘片表面介质材料等进行监测,当SMART监测并分析出硬盘可能出现问题时会及时向用户报警以避免计算机数据受损失。SMART技术必须在主板支持的前提下才能发生作用,而且SMART技术也不能保证能预报所有可能发生的硬盘故障。Windows没有内置SMART相关工具,需要安装第三方工具软件,vmware虚拟机的硬盘不支持SMART,Linux上很早就有了SMART支持了,可以yum命令安装该工具即可,smartctl是Smartmontools工具安装之后的可执行命令,我们通过此命令可以查看磁盘是否支持smart检测,执行smart检测等。

    02

    http协议户端下载流程

    /************************************************************************************** 功能:http协议客户端网络下载测试 时间:2014-03-09 version : V1.0 说明:http协议客户端工作要点 1.创建socketbind本地socket,发起连接connetct ,完成tcp三次握手 2.向服务器发起http请求,即post或get动作,http协议请求格式见   http协议规范  3.读http响应,可以判定http 服务器和客户端是否通讯正常,如果失败,  可以根据错误代码判定不成功原因。  http 响应和http 错误代码见http协议部分  4.http响应会返回内容的长度和内容类型,这个信息在在在线业务中是个  非常有用的信息,比如流媒体是边看边下载,如果要计算流媒体长度  只能从http响应读取。 ***************************************************************************************/ #include <fcntl.h> #include <sys/syscall.h> #include <sys/mman.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <sys/types.h> #include <errno.h> #include <stdlib.h> #define SERVER_PORT 5000 #define BUF_MASK 0x1ff #define BUF_SIZE (188*7*64) #define O_DIRECT 0x8000 void usage() {     printf("Usage: http_test_client: -d <srv-ip> -p <srv-port> -f <content-file> [-h -a -v]\n");     printf("options are:\n");     printf(" -d <srv-ip>   # IP address of HTTP Server (e.g. 192.168.1.110)\n");     printf(" -p <srv-port> # Port of HTTP Server (e.g. 5000)\n");     printf(" -f <file>     # url of stream; /data/videos prepended (e.g. portugal.mpg) \n");     printf(" -m            # just leave content in memory, dont write to disk (default: write to file)\n");     printf(" -v            # print periodic stats (default: no)\n");     printf(" -h            # prints http_test_client usage\n");     printf("\n"); } double difftime1(struct timeval *start, struct timeval *stop) { double dt = 1000000.*(stop->tv_sec - start->tv_sec) + (stop->tv_usec - start->tv_usec); return dt; } /* This function creates a TCP connection to server and returns the socket descriptor */ int TcpConnect(char *server, int port, int socket_type) { int sd,rc; struct sockaddr_in localAddr, servAddr; struct h

    02

    http服务器端工作流程

    root@ubuntu:/home/hfl/hflsamb/network# ./http_test_server  -p 8000  http_test_server: port 8000,  cpu affinity CPU0, content directory /home/hfl/hflsamb/network, rate 19.400000, loop around 0, send_from_memory 0, verbose 0, disable TCP checksum 0 Allocated 4141032-bytes for buffering, # of DESC=24 Accepted Connection from 801ca8c0:51541  Read HTTP Req ( 125 bytes)[ GET //love.mp3 HTTP/1.1 Host: 192.168.28.128:8000 Rate: 19 PlaySpeed.dlna.org: speed=1 User-Agent: STDSOCKET Test App ] TokenFound = [/love.mp3] Stream file = /home/hfl/hflsamb/network//love.mp3 size=577760125939925376 HTTP Response [ HTTP/1.1 200 OK Content-Length: 2464551019266432 Connection: Keep-Alive Accept-Ranges: bytes Connection: close Content-Range: bytes 0--5224570189344358016/1 Server: Linux/2.6.18, UPnP/1.0, my test app ]Content File opened **** Reached EOF *******

    02

    扫码

    添加站长 进交流群

    领取专属 10元无门槛券

    手把手带您无忧上云

    扫码加入开发者社群

    热门标签

    活动推荐

      运营活动

      活动名称
      广告关闭
      领券