Tag : linux

$:host www.baidu.com www.baidu.com has address 0.0.0.90 www.baidu.com has IPv6 address ::0.0.0.91 $:dig +trace www.baidu.com ; ; Question section mismatch: got ./RESERVED0/CLASS512 ; ; Question section mismatch: got ./RESERVED0/CLASS512 ; <<>> DiG 9.8.3-P1 <<>> +trace www.baidu.com ; ; global options: +cmd ; ; connection timed out; no servers could be reached $:wget www.baidu.com –2017-07-01 15:34:44– http://www.baidu.com/ ..

Read more

When learning pthread, I encountered a problem. I was not sure about it. I posted the code first. #include <pthread.h> #include <stdio.h>#include <unistd.h> pthread_cond_t cond; pthread_mutex_t mutex; void *Test(void *arg) { pthread_mutex_lock(&mutex); while (1) { pthread_cond_wait(&cond, &mutex); printf(“Got notified\n”); break; } pthread_mutex_unlock(&mutex); return NULL; } int main() { pthread_cond_init(&cond, NULL); pthread_mutex_init(&mutex, NULL); pthread_t t; pthread_create(&t, ..

Read more

There is one now.HTTPTheFile download server, has been limited at presentSingle threadThe download speed of. Speed is200kb/sBut if the user usesMultithreadingDownload, like Thunderbolt. You can break through the limit and double it. Excuse mecentosHow can speed be limited? You can use nginx’s limit_conn_module to limit the number of client IP connections.The following are thin configurations: ..

Read more