How to create the asl.db file?
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
New MacBook Pro.
Everything works great, except...
Doesn't have a /var/log/asl.db file, so in Console I have no "Console Messages" or "All messages".
Reboot doesn't create one.
Quitting and restarting syslogd doesn't create one.
Creating one by hand via "touch" creates a file with that name,
but console doesn't recognize it, I guess.
When I click on, say, "All messages" in Console, System.log says: "Error: aslstorematch Status InvalidArgument".
Is there a correct way to create asl.db?
Aside from re-installing the OS, is there anything else I should try?
Thanks for any advice.
charlie
14 replies
Sign in or join Beachball Help to reply.
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Interesting that there should be another thread on this subject. See Terminal login message missing. I think this should restore your asl.db :
sudo newsyslog -CCBUT it depends on the existence of /etc/newsyslog.conf to tell it what log files to create. If you don't have this file, post back and we can construct one for you.
If this doesn't work, have a look at the '-x' option to syslog. You might be able to re-create the database with
sudo syslog -x /var/log/asl.dbalthough the man page is a bit confusing regarding this option.
If any of this works, please share!
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for thinking about this with me.
It's an interesting learning experience.So, the newsyslog command appeared to do nothing (after working on it for several seconds).
The syslog -x command failed with "bus error", but then the file was there.
After rebooting, Console still fails to read the file.I tried the commands again, just for fun. Nothing new with the newsyslog, but now syslog -x fails with "export file open failed: Read Operation Failed".
I have an /etc/newsyslog.conf; it's apparently a plain text file which I can read and (gulp) write to.
How should it look?Thanks again.
charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I just compared the newsyslog.conf, and syslog.conf files to those on a neighboring machine (iMac). Identical.
Grrrr.
I can see all my log messages just fine in system.log, so this is not a big deal. But, now I am obsessed with this puzzle...
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
CT wrote:
It's an interesting learning experience.Yes …
So, the newsyslog command appeared to do nothing (after working on it for several seconds).
Yes, I also find it is very slow (see below)
The syslog -x command failed with "bus error", but then the file was there.
After rebooting, Console still fails to read the file.Sorry about that. I did say the man page was confusing.
I just compared the newsyslog.conf, and syslog.conf files to those on a neighboring machine (iMac). Identical.
Well, why not copy the asl.db across from the other machine? Then try:
sudo newsyslog -FI must say that despite what the man page says:
-F Force newsyslog to trim the logs, even if the trim conditions
have not been met. This option is useful for diagnosing system
problems by providing you with fresh logs that contain only the
problems.I found it didn't appear totally to do "what it says on the tin" despite "working on it for several seconds".
But that way you should at least have a valid asl.db, even if some of the older messages are wrong. These will eventually get purged.
But, now I am obsessed with this puzzle...
It's catching, isn't it?
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thank you for continuing to advise me.
I have an asl.db file from my old Powerbook.
To get the file to my new MBP I did some copying, so
now my permissions need to be set to the correct values,
I suppose. Help.Thanks again.
charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
CT wrote:
… so now my permissions need to be set to the correct values,
I suppose. Help.Tut tut … exactly what I meant to do I guess the last post got a bit long.
macbook:~ michaelc$ ls -l /var/log/asl.db
-rw------- 1 root wheel 45600 10 Dec 20:27 /var/log/asl.dbSo, to set that up, you will need to copy and paste the following into the Terminal window, one line at a time, with a return after each line:
sudo chown root:wheel /var/log/asl.db
sudo chmod 600 /var/log/asl.dbI assume you know about giving your password after the first sudo (the "gotcha" for most people is no echoing back, not even asterisks).
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Permissions are now correct on /var/log/asl.db
Still no success in using console to access this file.
I still get the "Error: aslstorematch status Invalid Argument" in system.log when I try "Console Messages" or "All Messages".The syslog -x business still is unable to send anything to asl.db, but now it complains of "export file open failed: Invalid Data Store", which sounds like it is not happy with the Powerbook's asl.db.
Thanks.
charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
CT wrote:
… now it complains of "export file open failed: Invalid Data Store", which sounds like it is not happy with the Powerbook's asl.db.The Powerbook would be running Tiger, I assume?
Comparing asl.db on my 10.4 machine with that on 10.5 shows them to be very different beasts. In 10.4, it appears to be straight ASCII text, whereas the 10.5 version contains binary, and starts with the ASCII characters "ASL DB" followed by a lot of NULLs.
So I don't think that is going to work
Can't think on anything more for the moment, and it is getting late …
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Actually, the asl.db file is from 10.5.5.
Go figure.
Thank you for all the personal cpu cycles you've devoted to this.charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I stopped the logging processes, I deleted everything in the /var/log/asl folder, I restarted the logging. No asl.db file was created, but new files in the asl folder got created. Now Console works properly! I guess asl.db is obsolete!
charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
CT wrote:
I stopped the logging processes, I deleted everything in the /var/log/asl folder, I restarted the logging. No asl.db file was created, but new files in the asl folder got created. Now Console works properly!I'm glad Console is now OK for you. Something very strange is happening.
I guess asl.db is obsolete!
I don't think so. Compare this with my post above:
macbook:~ michaelc$ ls -l /var/log/asl.db
-rw------- 1 root wheel 1019440 15 Dec 23:27 /var/log/asl.dbSo it grew quite a bit in 5 days, but hasn't done anything for the past month! Meanwhile there are up-to-date files in the /var/log/asl/ folder, just as you have. Be nice to know what is going on here
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for your input.
The plot thickens.
So, when did you update to 10.5.6?
charlie
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
CT wrote:
So, when did you update to 10.5.6?I see what you're getting at: I did wonder this myself. But now you posted, I went to check my install.log. MacOSXUpd10.5.6Patch.pkg was installed by Software Update on Dec 15 at 23:27.
Good sleuthing
- 0
Apple Support Community member ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I have a similar problem. "All Messages" and "Console Messages" queries render an error in systems log, and system.log is just betting flooded with errors.
Jan 30 07:28:20 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20: --- last message repeated 78 times ---
Jan 30 07:28:20 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20: --- last message repeated 80 times ---
Jan 30 07:28:20 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20: --- last message repeated 67 times ---
Jan 30 07:28:20 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:20 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:21: --- last message repeated 74 times ---
Jan 30 07:28:21 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:21 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:23: --- last message repeated 86 times ---
Jan 30 07:28:23 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)
Jan 30 07:28:23 wind-tunnel kernel[0]: syslogd 13 FS_WRITE SBF /private/var/log/asl 13 (seatbelt)
Jan 30 07:28:24: --- last message repeated 219 times ---
Jan 30 07:28:24 wind-tunnel kernel[0]: private/var/log/asl 13 (seatbelt)