Suspicious process on cpanel - centos

I found a malware on my server which I managed to clean and maldet does not report any malware anymore. Some websites loads very slow (mainly WordPress sites) although I cleaned them and made sure there is no infected files there.
I always get these in the error logs, and some other errors in exim where someone is trying to send emails out from my server how can I solve this issue.
Oct 24 00:59:15 leadhero lfd[13172]: *Suspicious Process* PID:12874 PPID:12841 User:herolead Uptime:98 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:15 leadhero lfd[13411]: *Suspicious Process* PID:13011 PPID:9993 User:herolead Uptime:112 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:15 leadhero lfd[13411]: *Suspicious Process* PID:13012 PPID:12075 User:herolead Uptime:110 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:15 leadhero lfd[13411]: *Suspicious Process* PID:13017 PPID:9994 User:herolead Uptime:108 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:15 leadhero lfd[13411]: *Suspicious Process* PID:13018 PPID:2081 User:herolead Uptime:108 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:15 leadhero lfd[13411]: *Suspicious Process* PID:13079 PPID:13016 User:herolead Uptime:91 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:00:16 leadhero lfd[13411]: *Suspicious Process* PID:13102 PPID:12143 User:herolead Uptime:82 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:01:15 leadhero lfd[13636]: *Suspicious Process* PID:13213 PPID:12843 User:herolead Uptime:110 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:02:15 leadhero lfd[13791]: *Suspicious Process* PID:13489 PPID:13111 User:herolead Uptime:110 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:03:15 leadhero lfd[13958]: *Suspicious Process* PID:13655 PPID:13390 User:herolead Uptime:111 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php
Oct 24 01:04:15 leadhero lfd[14105]: *Suspicious Process* PID:13832 PPID:12841 User:herolead Uptime:111 secs EXE:/usr/bin/php CMD:/usr/bin/php /home/herolead/public_html/thailand/index.php

In the previous answer I have spoken of the false positive. It is true. But you have left off.
For your information, these usadno CSF Firewall, and have not configured properly.
We understand how it works will be advisable as they remove the alert is easy, but it is not the way.
You must edit the file /etc/csf/csf.conf (You can also do this from the WHM)
You must be to edit de var PT_LIMIT
# Process Tracking. This option enables tracking of user and nobody processes
# and examines them for suspicious executables or open network ports. Its
# purpose is to identify potential exploit processes that are running on the
# server, even if they are obfuscated to appear as system services. If a
# suspicious process is found an alert email is sent with relevant information.
# It is then the responsibility of the recipient to investigate the process
# further as the script takes no further action
#
# The following is the number of seconds a process has to be active before it
# is inspected. If you set this time too low, then you will likely trigger
# false-positives with CGI or PHP scripts.
# Set the value to 0 to disable this feature
A good value PT_LIMIT = 180
If don't like lfd send emails for this, put 0
Also you can select users for ignore this directive. You must to read about /etc/csf/csf.pignore

The above alert is a part of false-positive. If there is no suspicious code in those files, you do not need to worry. If you are getting relay alert from remote IP, you tweak the server setting to allow relay from your server only. You should make this change only if you are aware what you are doing. This may break your email script if it is configured it in wring way. Better you should purchase managed VPS or hire some experts to do it for you.

Related

Permission to access open document's enclosing folder in macOS

I am trying to make a Mac app where the user can open a document file and use keys or menus to scroll through the next/previous files in the directory (as some image viewer apps do with images).
I was trying to do this by getting the folder URL for the current main document window, and getting the list of files in the folder in order. But it seems I can't get permission to do this. I run
fullPaths = try fileManager.contentsOfDirectory(at: folderURL, includingPropertiesForKeys: nil)
and I get the error:
The file “Journal DF” couldn’t be opened because you don’t have permission to view it.
"Journal DF" is a folder. I have read/write permissions on it.
I found an Apple developer thread that suggests this might have to do with sandboxing: although I'm getting the open document itself from an NSOpenPanel, I'm not getting the folder contents from that panel, so it doesn't want to give me permission. It looks like I could change a setting to turn off this sandboxing, which would mean the file couldn't go in the Mac App Store. This is an app mainly intended for my personal use, so I'll do that if I have to, but is there any more elegant way to access the contents of the open document's folder?
Here is the result of ls -lea#hO on a folder that gives the error:
total 8480
drwxr-xr-x# 26 Main staff - 832B Jul 3 11:28 .
com.dropbox.attributes 83B
drwxrwxrwx# 267 Main staff - 8.3K Aug 7 08:30 ..
com.apple.FinderInfo 32B
-rw-r--r--# 1 Main staff - 10K Jul 3 11:28 .DS_Store
com.apple.FinderInfo 32B
drwxr-xr-x 11 Main staff - 352B Jul 29 18:19 Current Skeletons
-rw-r--r--# 1 Main staff - 30K May 24 16:14 Foundation sources and opposition.xlsx
com.apple.FinderInfo 32B
com.apple.quarantine 30B
-rw-r--r--# 1 Main staff - 34K Apr 8 2018 Foundations Lucidchart 8-Apr-2018.pdf
com.apple.metadata:_kMDItemUserTags 42B
com.apple.metadata:kMDItemWhereFroms 1.2K
com.apple.quarantine 68B
-rw-------# 1 Main staff - 22K Feb 19 2018 Foundations Lucidchart.pdf
com.apple.metadata:_kMDItemUserTags 42B
com.apple.quarantine 32B
-rw-r--r--# 1 Main staff - 261K Feb 19 2018 Foundations Lucidchart.vdx
com.apple.metadata:_kMDItemUserTags 42B
com.apple.metadata:kMDItemWhereFroms 1.2K
com.apple.quarantine 68B
-rw-r--r--# 1 Main staff - 61K Feb 6 2016 Foundations Skeleton 5.tbx
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 151K Apr 28 2015 Journal Foundations A.md
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 10B
-rw-r--r--# 1 Main staff - 500K Apr 15 2016 Journal Foundations C (Dakini's conflicted copy 2016-04-15).md
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 528K Jun 5 2017 Journal Foundations C.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 11B
-rw-r--r--# 1 Main staff - 736K Sep 25 2017 Journal Foundations D.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 11B
drwxr-xr-x# 524 Main staff - 16K Nov 25 2017 Journal Foundations E
com.dropbox.attributes 83B
drwxr-xr-x# 765 Main staff - 24K Dec 10 2017 Journal Foundations F
com.dropbox.attributes 83B
drwxr-xr-x# 885 Main staff - 28K May 25 2018 Journal Foundations G
com.dropbox.attributes 83B
drwxr-xr-x# 682 Main staff - 21K Sep 8 2018 Journal Foundations H
com.dropbox.attributes 83B
drwxr-xr-x# 641 Main staff - 20K Jun 26 14:41 Journal Foundations I
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 528K May 28 2017 Journal Synthesis A.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 10B
drwxr-xr-x 213 Main staff - 6.7K Apr 17 21:40 Old Skeletons
-rw-r--r--# 1 Main staff - 1.2M May 17 2017 Reflect alias
com.apple.FinderInfo 32B
com.dropbox.attributes 83B
-rw-r--r-- 1 Main staff - 16K Jun 24 2017 True Foundations 1Sk.mellel
-rw-r--r--# 1 Main staff - 19K Feb 6 2018 True Foundations 2Sk.mellel
com.apple.metadata:kMDLabel_od4iyi2dtvvg7c4mdb6hnpcupi 105B
-rw-r--r--# 1 Main staff - 13K Aug 27 2014 foundations.mellel
com.apple.lastuseddate#PS 16B
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 13K May 10 2017 old discussion from pipeline.mellel
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 46K May 14 2017 parameter zero.mellel
com.dropbox.attributes 83B
Vadian's comment was correct: it is indeed about sandboxing. I looked up the process for security-scoped bookmarks and it seems way more complicated than I want to deal with, given that this app is primarily for my personal use. So I went into the .entitlements file and changed App Sandbox from YES to NO, and now it works as it was supposed to. That's good enough for me. If other people are having this problem and need to use the App Store, well, here's the info on security-scoped bookmarks and I hope it works for you.
Fist, let's check if that Apple thread fits your situation or not.
Compile your app, once compiled, give it full disk access via:
System Preferences -> Security & Privacy,
by adding it to the Full Disk Access applications list. (You are eliminating the first layer of security and allowing your app to access your Documents folder, pictures folder, desktop folder, music folder, contact folder and another 3 or 4 protected folders.
Attempt 1) Run it and try to browser files with it on any folder inside your home dir. See if it works or not.
Attempt 2) Also is valid to test it to browse files on any usb stick (because they don't have permissions flags). See if it works on USB Sticks
If it still says you don't have permissions, post your results and more details about your system version, and if possible, a result from terminal of the command ls -lea#hO /path/to/folder of the folder where it is giving error, so we can check the Unix/ACL and sandbox permissions of that folder.

IPython /bin/bash: /bin/bashfile.txt: Permission denied

This issue is inside IPython:
1) when i run the following, it works fine
for x in range(10):
!date
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
Tue Jun 12 13:25:18 EDT 2018
2) when i want to redirect it into the file, it gives the following error message:
for x in range(10):
!date > ${x}.txt
/bin/bash: /bin/bashfile.txt: Permission denied
Im honestly not sure why am i getting that error message. I don't understand it.
If you want to interpolate the value of the Python variable x into a shell command in IPython, the syntax for that is $x or {x}, not ${x}. When x is 0, ${x} expands to $0, which the shell then does its own expansion for. Your command should be
!date > {x}.txt
(It's unlikely that $0 would have expanded to /bin/bashfile, suggesting that you probably didn't actually run the code you posted.)
Not sure what exactly you are trying to do here, but you're trying to write to a file that you do not have write permission for.
Make a new file and try writing to it and you'll succeed.

ntp daily time drift

starting from about 2-3 weeks ago ntp lost its sync and since then it loses between 40 sec to 1 minute every day,
it then syncs this difference instantly, every day at around 9 pm.
/var/log/ntp.log :
8 Jun 09:01:54 ntpd[7688]: kernel time sync status change 4001
8 Jun 09:18:57 ntpd[7688]: kernel time sync status change 0001
8 Jun 09:53:08 ntpd[7688]: kernel time sync status change 4001
8 Jun 10:10:14 ntpd[7688]: kernel time sync status change 0001
8 Jun 12:26:45 ntpd[7688]: kernel time sync status change 4001
8 Jun 12:43:51 ntpd[7688]: kernel time sync status change 0001
8 Jun 14:43:19 ntpd[7688]: kernel time sync status change 4001
8 Jun 15:00:23 ntpd[7688]: kernel time sync status change 0001
8 Jun 16:25:45 ntpd[7688]: kernel time sync status change 4001
8 Jun 16:42:49 ntpd[7688]: kernel time sync status change 0001
8 Jun 17:16:59 ntpd[7688]: kernel time sync status change 4001
8 Jun 17:34:05 ntpd[7688]: kernel time sync status change 0001
8 Jun 19:16:30 ntpd[7688]: kernel time sync status change 4001
8 Jun 19:33:33 ntpd[7688]: kernel time sync status change 0001
8 Jun 20:59:28 ntpd[7688]: synchronized to LOCAL(0), stratum 10
8 Jun 21:17:43 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
**8 Jun 21:33:19 ntpd[7688]: time reset -33.667071 s**
8 Jun 21:37:36 ntpd[7688]: synchronized to LOCAL(0), stratum 10
8 Jun 21:38:40 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
9 Jun 10:56:38 ntpd[7688]: kernel time sync status change 4001
9 Jun 11:13:41 ntpd[7688]: kernel time sync status change 0001
9 Jun 12:04:56 ntpd[7688]: kernel time sync status change 4001
9 Jun 13:47:20 ntpd[7688]: kernel time sync status change 0001
9 Jun 14:21:31 ntpd[7688]: kernel time sync status change 4001
9 Jun 14:38:37 ntpd[7688]: kernel time sync status change 0001
9 Jun 20:11:40 ntpd[7688]: kernel time sync status change 4001
9 Jun 20:45:48 ntpd[7688]: kernel time sync status change 0001
9 Jun 21:03:40 ntpd[7688]: synchronized to LOCAL(0), stratum 10
9 Jun 21:21:35 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
**9 Jun 21:54:16 ntpd[7688]: time reset -35.209243 s**
9 Jun 21:57:54 ntpd[7688]: synchronized to LOCAL(0), stratum 10
9 Jun 21:59:00 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
10 Jun 20:57:04 ntpd[7688]: synchronized to LOCAL(0), stratum 10
10 Jun 21:03:59 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
**10 Jun 21:18:25 ntpd[7688]: time reset -36.757260 s**
10 Jun 21:21:45 ntpd[7688]: synchronized to LOCAL(0), stratum 10
10 Jun 21:23:52 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
11 Jun 21:07:25 ntpd[7688]: synchronized to LOCAL(0), stratum 10
11 Jun 21:24:25 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
**11 Jun 21:40:52 ntpd[7688]: time reset -38.305589 s**
11 Jun 21:44:29 ntpd[7688]: synchronized to LOCAL(0), stratum 10
11 Jun 21:45:33 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
12 Jun 08:37:43 ntpd[7688]: kernel time sync status change 4001
12 Jun 08:50:34 ntpd[7688]: kernel time sync status change 0001
12 Jun 21:01:10 ntpd[7688]: synchronized to LOCAL(0), stratum 10
12 Jun 21:07:53 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
**12 Jun 21:22:13 ntpd[7688]: time reset -39.854883 s**
12 Jun 21:26:19 ntpd[7688]: synchronized to LOCAL(0), stratum 10
12 Jun 21:27:23 ntpd[7688]: synchronized to 172.16.33.74, stratum 3
13 Jun 02:26:51 ntpd[7688]: kernel time sync status change 4001
13 Jun 04:43:29 ntpd[7688]: kernel time sync status change 0001
13 Jun 05:34:43 ntpd[7688]: kernel time sync status change 4001
13 Jun 06:25:57 ntpd[7688]: kernel time sync status change 0001
13 Jun 07:34:16 ntpd[7688]: kernel time sync status change 4001
13 Jun 07:51:21 ntpd[7688]: kernel time sync status change 0001
13 Jun 13:18:34 ntpd[7688]: ntpd exiting on signal 15
13 Jun 13:21:51 ntpd[6771]: synchronized to LOCAL(0), stratum 10
13 Jun 13:21:51 ntpd[6771]: kernel time sync status change 0001
13 Jun 13:23:57 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
13 Jun 21:10:58 ntpd[6771]: synchronized to LOCAL(0), stratum 10
13 Jun 21:27:09 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
**13 Jun 22:00:28 ntpd[6771]: time reset -41.396780 s**
13 Jun 22:00:28 ntpd[6771]: kernel time sync status change 4001
13 Jun 22:04:38 ntpd[6771]: synchronized to LOCAL(0), stratum 10
13 Jun 22:04:38 ntpd[6771]: kernel time sync status change 0001
13 Jun 22:05:44 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
14 Jun 04:09:19 ntpd[6771]: kernel time sync status change 4001
14 Jun 04:43:27 ntpd[6771]: kernel time sync status change 0001
14 Jun 06:08:50 ntpd[6771]: kernel time sync status change 4001
14 Jun 06:25:55 ntpd[6771]: kernel time sync status change 0001
14 Jun 07:00:05 ntpd[6771]: kernel time sync status change 4001
14 Jun 07:51:19 ntpd[6771]: kernel time sync status change 0001
14 Jun 08:25:28 ntpd[6771]: kernel time sync status change 4001
14 Jun 08:42:31 ntpd[6771]: kernel time sync status change 0001
14 Jun 10:59:05 ntpd[6771]: kernel time sync status change 4001
14 Jun 11:16:11 ntpd[6771]: kernel time sync status change 0001
14 Jun 12:24:27 ntpd[6771]: kernel time sync status change 4001
14 Jun 12:33:00 ntpd[6771]: kernel time sync status change 0001
14 Jun 16:40:51 ntpd[6771]: kernel time sync status change 4001
14 Jun 16:57:55 ntpd[6771]: kernel time sync status change 0001
14 Jun 17:49:11 ntpd[6771]: kernel time sync status change 4001
14 Jun 18:57:29 ntpd[6771]: kernel time sync status change 0001
14 Jun 19:31:38 ntpd[6771]: kernel time sync status change 4001
14 Jun 19:40:10 ntpd[6771]: kernel time sync status change 0001
14 Jun 20:56:52 ntpd[6771]: synchronized to LOCAL(0), stratum 10
14 Jun 21:03:37 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
**14 Jun 21:16:53 ntpd[6771]: time reset -42.943002 s**
14 Jun 21:20:34 ntpd[6771]: synchronized to LOCAL(0), stratum 10
14 Jun 21:21:39 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
15 Jun 04:57:42 ntpd[6771]: kernel time sync status change 4001
15 Jun 05:14:47 ntpd[6771]: kernel time sync status change 0001
15 Jun 06:23:10 ntpd[6771]: kernel time sync status change 4001
15 Jun 06:57:17 ntpd[6771]: kernel time sync status change 0001
15 Jun 09:13:47 ntpd[6771]: kernel time sync status change 4001
15 Jun 11:13:19 ntpd[6771]: kernel time sync status change 0001
15 Jun 12:04:32 ntpd[6771]: kernel time sync status change 4001
15 Jun 12:21:38 ntpd[6771]: kernel time sync status change 0001
15 Jun 13:12:54 ntpd[6771]: kernel time sync status change 4001
15 Jun 13:55:37 ntpd[6771]: kernel time sync status change 0001
15 Jun 15:55:11 ntpd[6771]: kernel time sync status change 4001
15 Jun 16:12:14 ntpd[6771]: kernel time sync status change 0001
15 Jun 20:59:18 ntpd[6771]: synchronized to LOCAL(0), stratum 10
15 Jun 21:21:16 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
15 Jun 21:54:18 ntpd[6771]: time reset -44.484272 s
15 Jun 21:58:27 ntpd[6771]: synchronized to LOCAL(0), stratum 10
15 Jun 21:59:30 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
16 Jun 03:53:30 ntpd[6771]: kernel time sync status change 4001
16 Jun 04:44:45 ntpd[6771]: kernel time sync status change 0001
16 Jun 05:53:03 ntpd[6771]: kernel time sync status change 4001
16 Jun 07:01:18 ntpd[6771]: kernel time sync status change 0001
16 Jun 08:26:43 ntpd[6771]: kernel time sync status change 4001
16 Jun 08:43:49 ntpd[6771]: kernel time sync status change 0001
16 Jun 09:35:06 ntpd[6771]: kernel time sync status change 4001
16 Jun 09:52:09 ntpd[6771]: kernel time sync status change 0001
16 Jun 10:26:19 ntpd[6771]: kernel time sync status change 4001
16 Jun 11:00:27 ntpd[6771]: kernel time sync status change 0001
16 Jun 11:34:37 ntpd[6771]: kernel time sync status change 4001
16 Jun 11:51:41 ntpd[6771]: kernel time sync status change 0001
16 Jun 12:42:59 ntpd[6771]: kernel time sync status change 4001
16 Jun 13:00:03 ntpd[6771]: kernel time sync status change 0001
16 Jun 14:25:25 ntpd[6771]: kernel time sync status change 4001
16 Jun 15:16:39 ntpd[6771]: kernel time sync status change 0001
16 Jun 16:24:57 ntpd[6771]: kernel time sync status change 4001
16 Jun 17:16:09 ntpd[6771]: kernel time sync status change 0001
16 Jun 18:58:35 ntpd[6771]: kernel time sync status change 4001
16 Jun 19:15:40 ntpd[6771]: kernel time sync status change 0001
16 Jun 20:59:36 ntpd[6771]: synchronized to LOCAL(0), stratum 10
16 Jun 21:16:46 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
16 Jun 21:49:33 ntpd[6771]: time reset -46.023214 s
16 Jun 21:52:53 ntpd[6771]: synchronized to LOCAL(0), stratum 10
16 Jun 21:53:57 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
17 Jun 03:12:33 ntpd[6771]: kernel time sync status change 4001
17 Jun 03:29:36 ntpd[6771]: kernel time sync status change 0001
17 Jun 04:20:49 ntpd[6771]: kernel time sync status change 4001
17 Jun 05:12:01 ntpd[6771]: kernel time sync status change 0001
17 Jun 07:28:37 ntpd[6771]: kernel time sync status change 4001
17 Jun 08:02:43 ntpd[6771]: kernel time sync status change 0001
17 Jun 09:28:07 ntpd[6771]: kernel time sync status change 4001
17 Jun 10:02:13 ntpd[6771]: kernel time sync status change 0001
17 Jun 11:10:31 ntpd[6771]: kernel time sync status change 4001
17 Jun 11:27:36 ntpd[6771]: kernel time sync status change 0001
17 Jun 17:01:37 ntpd[6771]: kernel time sync status change 4001
17 Jun 17:18:42 ntpd[6771]: kernel time sync status change 0001
17 Jun 20:09:32 ntpd[6771]: kernel time sync status change 4001
17 Jun 21:01:48 ntpd[6771]: synchronized to LOCAL(0), stratum 10
17 Jun 21:01:48 ntpd[6771]: kernel time sync status change 0001
17 Jun 21:19:34 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
17 Jun 21:52:12 ntpd[6771]: time reset -47.573538 s
17 Jun 21:56:07 ntpd[6771]: synchronized to LOCAL(0), stratum 10
17 Jun 21:57:11 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
18 Jun 20:59:25 ntpd[6771]: synchronized to LOCAL(0), stratum 10
18 Jun 21:24:16 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
18 Jun 21:40:42 ntpd[6771]: time reset -49.122802 s
18 Jun 21:44:59 ntpd[6771]: synchronized to LOCAL(0), stratum 10
18 Jun 21:46:03 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
19 Jun 09:30:18 ntpd[6771]: kernel time sync status change 4001
19 Jun 11:12:46 ntpd[6771]: kernel time sync status change 0001
19 Jun 11:46:55 ntpd[6771]: kernel time sync status change 4001
19 Jun 12:38:10 ntpd[6771]: kernel time sync status change 0001
19 Jun 14:03:33 ntpd[6771]: kernel time sync status change 4001
19 Jun 14:20:36 ntpd[6771]: kernel time sync status change 0001
19 Jun 15:11:48 ntpd[6771]: kernel time sync status change 4001
19 Jun 15:45:55 ntpd[6771]: kernel time sync status change 0001
19 Jun 16:20:04 ntpd[6771]: kernel time sync status change 4001
19 Jun 16:37:08 ntpd[6771]: kernel time sync status change 0001
19 Jun 17:11:19 ntpd[6771]: kernel time sync status change 4001
19 Jun 17:28:24 ntpd[6771]: kernel time sync status change 0001
19 Jun 19:36:29 ntpd[6771]: kernel time sync status change 4001
19 Jun 19:53:33 ntpd[6771]: kernel time sync status change 0001
19 Jun 21:02:58 ntpd[6771]: synchronized to LOCAL(0), stratum 10
19 Jun 21:20:53 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
19 Jun 21:37:16 ntpd[6771]: time reset -50.669270 s
19 Jun 21:41:34 ntpd[6771]: synchronized to LOCAL(0), stratum 10
19 Jun 21:42:07 ntpd[6771]: synchronized to 172.16.33.74, stratum 3
at this point i set up a cron job to run ntpdate every hour:
20 Jun 17:57:39 ntpdate[22583]: adjust time server 172.16.33.74 offset -0.000421 sec
20 Jun 18:01:01 ntpdate[22623]: adjust time server 172.16.33.74 offset 0.000238 sec
20 Jun 19:01:01 ntpdate[23046]: adjust time server 172.16.33.74 offset 0.000753 sec
20 Jun 20:01:02 ntpdate[23471]: adjust time server 172.16.33.74 offset 0.000574 sec
20 Jun 21:00:09 ntpdate[23890]: step time server 172.16.33.74 offset -52.211231 sec
20 Jun 21:01:01 ntpdate[23909]: adjust time server 172.16.33.74 offset 0.000033 sec
20 Jun 22:01:01 ntpdate[24332]: adjust time server 172.16.33.74 offset 0.000870 sec
20 Jun 23:01:02 ntpdate[24757]: adjust time server 172.16.33.74 offset 0.000499 sec
21 Jun 00:01:01 ntpdate[25188]: adjust time server 172.16.33.74 offset 0.004997 sec
21 Jun 01:01:01 ntpdate[25611]: adjust time server 172.16.33.74 offset -0.000058 sec
21 Jun 02:01:01 ntpdate[26035]: adjust time server 172.16.33.74 offset 0.001489 sec
21 Jun 03:01:01 ntpdate[26460]: adjust time server 172.16.33.74 offset 0.000491 sec
21 Jun 04:01:01 ntpdate[27712]: adjust time server 172.16.33.74 offset 0.000730 sec
21 Jun 05:01:01 ntpdate[28270]: adjust time server 172.16.33.74 offset 0.000841 sec
21 Jun 06:01:01 ntpdate[28753]: adjust time server 172.16.33.74 offset 0.000405 sec
21 Jun 07:01:01 ntpdate[29177]: adjust time server 172.16.33.74 offset 0.000474 sec
21 Jun 08:01:01 ntpdate[29601]: adjust time server 172.16.33.74 offset 0.000583 sec
21 Jun 09:01:01 ntpdate[30024]: adjust time server 172.16.33.74 offset 0.000660 sec
21 Jun 10:01:01 ntpdate[30448]: adjust time server 172.16.33.74 offset 0.000469 sec
21 Jun 11:01:01 ntpdate[30872]: adjust time server 172.16.33.74 offset 0.000605 sec
21 Jun 12:01:01 ntpdate[31298]: adjust time server 172.16.33.74 offset 0.000159 sec
21 Jun 13:01:01 ntpdate[31721]: adjust time server 172.16.33.74 offset 0.000539 sec
21 Jun 14:01:01 ntpdate[32146]: adjust time server 172.16.33.74 offset 0.000530 sec
21 Jun 15:01:01 ntpdate[32570]: adjust time server 172.16.33.74 offset 0.000560 sec
21 Jun 16:01:01 ntpdate[583]: adjust time server 172.16.33.74 offset 0.000820 sec
21 Jun 17:01:01 ntpdate[1020]: adjust time server 172.16.33.74 offset 0.000512 sec
21 Jun 18:01:01 ntpdate[1445]: adjust time server 172.16.33.74 offset 0.000239 sec
21 Jun 19:01:01 ntpdate[1870]: adjust time server 172.16.33.74 offset 0.000607 sec
21 Jun 20:01:01 ntpdate[2294]: adjust time server 172.16.33.74 offset 0.000717 sec
21 Jun 21:01:02 ntpdate[2743]: adjust time server 172.16.33.74 offset 0.000965 sec
21 Jun 22:00:07 ntpdate[3174]: step time server 172.16.33.74 offset -53.812615 sec
21 Jun 22:01:01 ntpdate[3196]: adjust time server 172.16.33.74 offset 0.000024 sec
21 Jun 23:01:01 ntpdate[3641]: adjust time server 172.16.33.74 offset 0.000496 sec
22 Jun 00:01:01 ntpdate[4133]: adjust time server 172.16.33.74 offset 0.000920 sec
22 Jun 01:01:01 ntpdate[4557]: adjust time server 172.16.33.74 offset 0.000914 sec
22 Jun 02:01:01 ntpdate[4980]: adjust time server 172.16.33.74 offset 0.000702 sec
22 Jun 03:01:01 ntpdate[5404]: adjust time server 172.16.33.74 offset 0.000663 sec
22 Jun 04:01:01 ntpdate[6631]: adjust time server 172.16.33.74 offset 0.000608 sec
22 Jun 05:01:01 ntpdate[7189]: adjust time server 172.16.33.74 offset 0.000650 sec
22 Jun 06:01:01 ntpdate[7613]: adjust time server 172.16.33.74 offset 0.000895 sec
22 Jun 07:01:01 ntpdate[8037]: adjust time server 172.16.33.74 offset 0.000843 sec
22 Jun 08:01:01 ntpdate[8462]: adjust time server 172.16.33.74 offset 0.000559 sec
22 Jun 09:01:01 ntpdate[8885]: adjust time server 172.16.33.74 offset 0.000595 sec
22 Jun 10:01:01 ntpdate[9309]: adjust time server 172.16.33.74 offset 0.000617 sec
22 Jun 11:01:01 ntpdate[9734]: adjust time server 172.16.33.74 offset 0.000527 sec
22 Jun 12:01:01 ntpdate[10158]: adjust time server 172.16.33.74 offset 0.000546 sec
22 Jun 13:01:01 ntpdate[10582]: adjust time server 172.16.33.74 offset 0.000663 sec
22 Jun 14:01:01 ntpdate[11006]: adjust time server 172.16.33.74 offset 0.000790 sec
22 Jun 15:01:01 ntpdate[11429]: adjust time server 172.16.33.74 offset 0.000599 sec
22 Jun 16:01:01 ntpdate[11854]: adjust time server 172.16.33.74 offset 0.001093 sec
22 Jun 17:01:02 ntpdate[12277]: adjust time server 172.16.33.74 offset 0.000444 sec
22 Jun 18:01:01 ntpdate[12702]: adjust time server 172.16.33.74 offset 0.001054 sec
22 Jun 19:01:01 ntpdate[13126]: adjust time server 172.16.33.74 offset 0.000751 sec
22 Jun 20:01:01 ntpdate[13550]: adjust time server 172.16.33.74 offset 0.000832 sec
22 Jun 21:01:01 ntpdate[13973]: adjust time server 172.16.33.74 offset 0.001551 sec
22 Jun 22:00:06 ntpdate[14398]: step time server 172.16.33.74 offset -55.338569 sec
22 Jun 22:01:01 ntpdate[14418]: adjust time server 172.16.33.74 offset 0.000044 sec
22 Jun 23:01:01 ntpdate[14845]: adjust time server 172.16.33.74 offset 0.000949 sec
23 Jun 00:01:01 ntpdate[15276]: adjust time server 172.16.33.74 offset 0.000699 sec
23 Jun 01:01:01 ntpdate[15700]: adjust time server 172.16.33.74 offset 0.001248 sec
23 Jun 02:01:01 ntpdate[16123]: adjust time server 172.16.33.74 offset 0.001125 sec
23 Jun 03:01:02 ntpdate[16547]: adjust time server 172.16.33.74 offset -0.000017 sec
23 Jun 04:01:01 ntpdate[17812]: adjust time server 172.16.33.74 offset 0.000511 sec
23 Jun 05:01:01 ntpdate[18371]: adjust time server 172.16.33.74 offset 0.000460 sec
23 Jun 06:01:01 ntpdate[18795]: adjust time server 172.16.33.74 offset 0.000756 sec
23 Jun 07:01:01 ntpdate[19219]: adjust time server 172.16.33.74 offset 0.000756 sec
23 Jun 08:01:01 ntpdate[19643]: adjust time server 172.16.33.74 offset 0.000925 sec
23 Jun 09:01:01 ntpdate[20066]: adjust time server 172.16.33.74 offset 0.000770 sec
23 Jun 10:01:01 ntpdate[20491]: adjust time server 172.16.33.74 offset 0.000929 sec
23 Jun 11:01:01 ntpdate[20915]: adjust time server 172.16.33.74 offset 0.001033 sec
23 Jun 12:01:01 ntpdate[21339]: adjust time server 172.16.33.74 offset 0.000177 sec
23 Jun 13:01:01 ntpdate[21763]: adjust time server 172.16.33.74 offset 0.000831 sec
23 Jun 14:01:01 ntpdate[22187]: adjust time server 172.16.33.74 offset 0.000671 sec
23 Jun 15:01:01 ntpdate[22611]: adjust time server 172.16.33.74 offset 0.000742 sec
23 Jun 16:01:01 ntpdate[23034]: adjust time server 172.16.33.74 offset 0.000978 sec
23 Jun 17:01:01 ntpdate[23459]: adjust time server 172.16.33.74 offset 0.000954 sec
23 Jun 18:01:02 ntpdate[23882]: adjust time server 172.16.33.74 offset 0.000546 sec
23 Jun 19:01:01 ntpdate[24307]: adjust time server 172.16.33.74 offset 0.001156 sec
23 Jun 20:01:01 ntpdate[24731]: adjust time server 172.16.33.74 offset 0.000255 sec
23 Jun 21:01:02 ntpdate[25155]: adjust time server 172.16.33.74 offset 0.001095 sec
23 Jun 22:00:04 ntpdate[25579]: step time server 172.16.33.74 offset -56.876308 sec
23 Jun 22:01:01 ntpdate[25600]: adjust time server 172.16.33.74 offset 0.000056 sec
23 Jun 23:01:01 ntpdate[26019]: adjust time server 172.16.33.74 offset 0.001729 sec
24 Jun 00:01:02 ntpdate[26450]: adjust time server 172.16.33.74 offset 0.000364 sec
then added cron every 5 minutes:
24 Jun 22:00:01 ntpdate[5200]: adjust time server 172.16.33.74 offset 0.000874 sec
24 Jun 22:01:01 ntpdate[5217]: adjust time server 172.16.33.74 offset -0.000417 sec
24 Jun 22:05:01 ntpdate[5250]: adjust time server 172.16.33.74 offset 0.000289 sec
24 Jun 22:10:01 ntpdate[5288]: adjust time server 172.16.33.74 offset -0.000060 sec
**24 Jun 22:14:02 ntpdate[5326]: step time server 172.16.33.74 offset -58.428188 sec**
24 Jun 22:15:01 ntpdate[5332]: adjust time server 172.16.33.74 offset 0.000055 sec
**24 Jun 22:19:02 ntpdate[5372]: step time server 172.16.33.74 offset -58.458807 sec**
24 Jun 22:20:02 ntpdate[5380]: adjust time server 172.16.33.74 offset 0.000030 sec
24 Jun 22:25:01 ntpdate[5416]: adjust time server 172.16.33.74 offset 0.000078 sec
24 Jun 22:30:01 ntpdate[5454]: adjust time server 172.16.33.74 offset 0.000039 sec
24 Jun 22:35:01 ntpdate[5490]: adjust time server 172.16.33.74 offset 0.000058 sec
24 Jun 22:40:01 ntpdate[5530]: adjust time server 172.16.33.74 offset 0.000038 sec
24 Jun 22:45:01 ntpdate[5566]: adjust time server 172.16.33.74 offset 0.000055 sec
24 Jun 22:50:01 ntpdate[5604]: adjust time server 172.16.33.74 offset 0.000039 sec
24 Jun 22:55:01 ntpdate[5640]: adjust time server 172.16.33.74 offset 0.000060 sec
24 Jun 23:01:01 ntpdate[5693]: adjust time server 172.16.33.74 offset 0.000043 sec
there are two times there the clock skips by almost 1 minute.
already checked other log files on the server and there is literally no data writen to any log other then ntp.log at this time.
there are no backup tasks etc. running at this time.
the server is a VMWARE virtual machine, and time synchronization with the host has been disabled.
server os is openfiler 2.3
uname -a
Linux xxxxxxxxxxxxxxxxxxx 2.6.29.6-0.23.smp.gcc3.4.x86.i686 #1 SMP Mon Feb 8 16:28:15 GMT 2010 i686 i686 i386 GNU/Linux

sphinx performance after idle

I'm writing a web application for which I'm using Sphinx to search around a million documents.
The performance is excellent, with a typical query taking just 0.05 seconds, but if no queries are made for a few hours, it suddenly takes much longer - up to 1000x longer for a couple of queries, then returns to normal. The query log looks like this:
[Wed Mar 7 17:23:55.937 2012] 0.221 sec
[Wed Mar 7 17:32:00.726 2012] 0.012 sec
[Wed Mar 7 17:32:00.984 2012] 0.052 sec
[Wed Mar 7 17:32:01.416 2012] 0.222 sec
[Thu Mar 8 09:15:10.418 2012] 10.147 sec
[Thu Mar 8 09:16:00.560 2012] 48.262 sec
[Thu Mar 8 09:16:55.429 2012] 54.153 sec
[Thu Mar 8 09:17:54.454 2012] 0.012 sec
[Thu Mar 8 09:17:54.713 2012] 0.052 sec
[Thu Mar 8 09:17:55.141 2012] 0.218 sec
I'm guessing maybe my busy server is swapping Sphinx's memory when it is unused or something.
How can I resolve this?
I considered scripting fake queries every minute but that seems like quite an ugly hack.
How fast are the disks on this server?
I imagine this due to having to go back to disk for the indexes. Once accessed a few times, the OS will have cached the files.
It might be worth considering a SSD disk. A small SSD disk - big enough for sphinxes indexs - is relativly cheap nowadays.
If it really is memory swapping, that also suggests you have slow disks. But that is also something to address. Can you add more memory to server? (or even put the swap partition on the newly installed SSD disk :)
btw, find out if swapping is happening with something like Munin (or Cacti etc)

Audio not playing when iPhone is sleeping

I would like to know one thing. I hope you people can guide me well.
I am creating an application which needs some audio alerts. I am using AVAudioPlayer for this purpose.
I also set the Audio session like this (in my main delegate class):
//to play from sleep
OSStatus result = AudioSessionInitialize(NULL, NULL, interruptionListenerCallback, self);
UInt32 category = kAudioSessionCategory_MediaPlayback;
result = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), category);
AudioSessionSetActive(YES);
I am able to play music if my screen is locked forcefully, but I am not able to play mp3 files if the iPhone go into sleep mode automatically.
In general after 10 minutes I am not getting any music from my application. Could anyone tell me what I am missing? Please guide me if you know about my problem.
EDIT 1
I am currently using kAudioSessionCategory_MediaPlayback.
I written it in my code, i pasted it here.
EDIT 2
I want to start a audio play back from a sleeping iphone.
Please help me if you know.
EDIT 3
idleTimerDisabled , consume my battery ?
I am creating a alarm so this application can run up to 10 hours.
It will disable light on screen?
then i can use it.
I already seen some application which running on iPhone which play music from sleep mode.
Let me try this, thank you for the reply.
I found the answer already on SO in this thread here and also in this thread on SO.
What's happening is that the iPhone goes into deep sleep mode after 10 minutes (after the screen is locked) where it stops your NSTimer's and goes into lower power mode. Even when you have the category set to MediaPlayback it will do this unless you are actually playing a sound. The solution given is to play a "silent" sound file periodically to prevent it from going into deep sleep mode.
Here's what I see in the console log at the time deep sleep occurs (the Warnings are from my clock app):
Thu Dec 24 09:25:09 unknown Clock[16346] <Warning>: ClockDigital itemInterval=0 curInterval=0 needsUpdate=YES
Thu Dec 24 09:25:09 unknown Clock[16346] <Warning>: BatteryIcon itemInterval=6 curInterval=0 needsUpdate=NO
Thu Dec 24 09:25:09 unknown CommCenter[28] <Notice>: Telling CSI to go low power.
Thu Dec 24 09:25:09 unknown CommCenter[28] <Notice>: CSI can enter low power, so now telling to do so.
Thu Dec 24 09:25:09 unknown CommCenter[28] <Notice>: Will sleep. Heard from CSI in 0.00501698 seconds
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleSynopsysOTGCore::sleepWakeNotification: Sysmtem Going to sleep
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AirPort: Disabled AppleBCMWLAN (link 2, sys 1, user 1)
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN::setPOWER() [kernel_task]: Setting power state to 0
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleMultitouchN1SPI: disabled power
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN Left BSS: # 0xcf3cc800, BSSID = 00:0f:a3:1c:9f:0c, rssi = -53, rate = 54 (100%), channel = 7, encryption = 0x2, ap = 1, failures = 0, age = 26, ssid[ 8] = "mggm.ap1"
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AirPort: Link Down on en0
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN::powerOff Ready to power off
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN::setPowerStateGated() : Powering Off and sleeping
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN::powerOff Ready to power off
Thu Dec 24 09:25:10 unknown configd[22] <Error>: WiFi:[283368310.000857]: Unable to dispatch message to client dataaccessd (0x10000004)
Thu Dec 24 09:25:10 unknown configd[22] <Error>: WiFi:[283368310.013365]: Unable to dispatch message to client apsd (0x10000004)
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: ClockVC: adjusted interval: 0.993291
Thu Dec 24 09:25:10 unknown configd[22] <Error>: WiFi:[283368310.018146]: Error initiating scan request: 82
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: AppleBCMWLAN::setPOWER(): IOKit power off. Discarding request.
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: CalendarDay itemInterval=5 curInterval=0 needsUpdate=NO
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: BatteryState itemInterval=6 curInterval=0 needsUpdate=NO
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: MindfulnessBell itemInterval=2 curInterval=0 needsUpdate=NO
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: ClockDigital itemInterval=0 curInterval=0 needsUpdate=YES
Thu Dec 24 09:25:10 unknown Clock[16346] <Warning>: BatteryIcon itemInterval=6 curInterval=0 needsUpdate=NO
Thu Dec 24 09:25:10 unknown kernel[0] <Debug>: System Sleep
You need to use a different Audio Session Category. You can check the documentation here.
I think the one you should use is kAudioSessionCategory_MediaPlayback.
To prevent your app from being silenced after n minutes, you might also need to set the UIApplication's idleTimerDisabled property to YES.
You should try this
[[AVAudioSession sharedInstance] setDelegate: self];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];
referenced from a tutorial at http://www.mindyourcode.com/ios/iphone/how-to-play-audio-in-iphone-sleep-mode/