SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Tue Jul 01, 2025 13:48
SMSTools3 Community » Search Bottom

Page:  1

Keywords:
Mode: All keywords (AND)
eschliske: I will include your patch in the next version. Thanks for reporting this issue. Great. Thank you.
eschliske: I replaced the sync with an fsync. Now the sending of a SMS is done in few seconds. Here my patch. *** ../../smstools3/src/locking.c 2010-08-18 13:34:57.000000000 +0200 --- locking.c 2011-05-02 15:31:39.886088442 +0200 *************** *** 44,51 **** { snprintf(pid, sizeof(pid), "%i %s\n", (int)getpid(), DEVICE.name); write(lockfile, pid, strlen(pid)); close(lockfile); - sync(); return 1; } } --- 44,51 ---- { snprintf(pid, sizeof(pid), "%i %s\n", (int)getpid(), DEVICE.name); write(lockfile, pid, strlen(pid)); + fsync(lockfile); close(lockfile); return 1; } } Is the fsync good enough?
eschliske: Operating system name and version: CentOS 5.6 Version of smsd: 3.1.14 Smsd installed from: sources Name and model of a modem / phone: Teltonika ModemUSB/G10 GSM Modem Interface: USB Sending SMS with the command sendsms takes about 30 seconds. When I follow the smsd daemon with strace I get following output. open("/var/spool/sms/outgoing/send_Q22851", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b24bf76b000 read(4, "To: +491622048015\n\nTESTSMS", 4096) = 26 close(4) = 0 munmap(0x2b24bf76b000, 4096) = 0 open("/var/spool/sms/outgoing/send_Q22851", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b24bf76b000 read(4, "To: +491622048015\n\nTESTSMS", 4096) = 26 read(4, "", 36864) = 0 close(4) = 0 munmap(0x2b24bf76b000, 4096) = 0 stat("/var/spool/sms/checked/send_Q22851.LOCK", 0x7fff09f52fa0) = -1 ENOENT (No such file or directory) open("/var/spool/sms/checked/send_Q22851.LOCK", O_WRONLY|O_CREAT|O_EXCL, 0644) = 4 write(4, "21729 \n", 7) = 7 close(4) = 0 sync() = 0 stat("/var/spool/sms/outgoing/send_Q22851", {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 open("/var/spool/sms/outgoing/send_Q22851", O_RDONLY) = 4 open("/var/spool/sms/checked/send_Q22851", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 5 read(4, "To: +491622048015\n\nTESTSMS", 1024) = 26 write(5, "To: +491622048015\n\nTESTSMS", 26) = 26 read(4, "", 1024) = 0 close(5) = 0 close(4) = 0 unlink("/var/spool/sms/outgoing/send_Q22851") = 0 unlink("/var/spool/sms/checked/send_Q22851.LOCK") = 0 open("/var/spool/sms/outgoing/send_Q22851", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0 write(3, "2011-05-02 11:27:47,5, smsd: Mov"..., 102) = 102 kill(21730, SIGCONT) The part that takes more then 20 seconds is the sync. Why is there a fs-sync? Can I change this behavior with a config option? Thank you. Erwin

Page:  1

SMSTools3 Community » Search Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.