wgscott Posted May 28, 2017 Share Posted May 28, 2017 There are several shell-scripts floating around (including one I made many years ago) that turn off a vast number of lanchd processes for OS X, which often have the perhaps undesirable effect of completely hosing the system. As an alternative, I have been watching /var/log/system.log to find clues about what might be problematic, and what I want to do is selectively target a few "processes" by understanding what they do, and then turn them off individually, to see if there is any difference (audible, or at least in terms of spamming the log file). I'd like this thread to become a "hit list" of processes that are unambiguously useless. (In other words, I don't want to turn off wireless or bluetooth -- this should be up to the individual user, and is easy enough to do anyway). What I want to do is target a few problem children that are unlikely to have any utility, especially if they are broken, and understand what they do, in case I change my mind (or discover an unintended consequence). Domus Digital 1 Link to comment
wgscott Posted May 28, 2017 Author Share Posted May 28, 2017 /System/Library/LaunchDaemons/com.apple.usbmuxd.plist My /var/log/system.log file is getting spammed with this: May 28 07:33:09 tv-stereo-mini com.apple.usbmuxd[20423]: notice device connected: 390-fe80::1056:d6a8:e8fc:389c:0 May 28 07:33:09 tv-stereo-mini com.apple.usbmuxd[20423]: error MuxTCPSendNextSegmentOverNetwork Unexpected EOF, client 3894-MobileDevice:0 -> 390-fe80::1056:d6a8:e8fc:389c:0:0 May 28 07:33:10 tv-stereo-mini com.apple.usbmuxd[20423]: error MuxTCPSendNextSegmentOverNetwork Unexpected EOF, client 3899-iTunes:0 -> 390-fe80::1056:d6a8:e8fc:389c:0:0 Near as I can tell, usbmuxd is only used for wirelessly syncing an iOS device with one's iTunes library. Unless you do that, you might be able to live without it. My first attempt to disable it: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.usbmuxd.plist That unloads the process, and the -w makes it stick beyond a reboot. However, the log file is now getting spammed with whining about its absence, so the work is not over! May 28 07:43:54 tv-stereo-mini iTunes[58228]: tid:907 - Muxed callbacks stopped, attempting to register again... May 28 07:43:56 tv-stereo-mini iTunes[58228]: _SubscribeForMuxNotifications (thread 0x700000c59000): USBMuxListenerCreate: Connection refused May 28 07:43:56 tv-stereo-mini iTunes[58228]: AMDeviceNotificationSubscribe failed (0xE8000063) May 28 07:43:56 tv-stereo-mini iTunes[58228]: _SubscribeForMuxNotifications (thread 0x700000c59000): USBMuxListenerCreate: Connection refused Quitting iTunes (which I usually leave open when NOT listening to music, since I use it to serve stuff) temporarily gets rid of the whining. At the very least, it tells us that having iTunes open in the background is probably not a good idea if you are listening to music with anything else that does not rely on the program itself. tmtomh 1 Link to comment
wgscott Posted May 28, 2017 Author Share Posted May 28, 2017 I was getting a weird Audirvana restart error in the log file, which manifested itself as a pause in playback. In this example, I use a launchd command that differs from "unload" to get it to STFU about some tidal plist file that doesn't even seem to exist on my system (I looked everywhere for it). I also use this command to turn off spotlight while I am at it, since I hate it. For whatever reason, deactivating it this way avoids issues associated with updates... 11 hours ago, wgscott said: I now issue this command upon every restart: launchctl remove com.tidal.LaunchHelper com.apple.Spotlight The launchctl remove command differs from the unload command in that you don't have to specify the location of the file, and the file (in the case of this tidal virus thing) need not even exist. The frequency of these pauses has now greatly decreased. I've only experienced one incident since using this trick. I don't know why launchd was constantly hunting for this nonexistent tidal plist file, but I got tired of trying to track it down and am using this hack instead. I have a suspicion it came with Audirvana, since it is only in that context that I have ever used tidal. I still have lots of other launchd errors in the console, so it wouldn't surprise me if this might create the issue. Link to comment
wgscott Posted May 28, 2017 Author Share Posted May 28, 2017 23 minutes ago, Ralf11 said: Can a 3rd party program install processes of this type, or are they all from the OS? Yes. I also make loads of them myself (so if something is creating a problem, it is a good chance it is mine, since I screw around with this stuff basically for entertainment.) In general, those that are provided with the OS or Apple-distributed programs reside in /System/Library/LaunchAgents or /System/Library/LaunchDaemons The ones that get run by the user go into Agents; those run by root (the system) go into Daemons. Third-party ones are supposed to go into /Library/LaunchAgents or /Library/LaunchDaemons and those specific to an individual user might also be found in /User/username/Library/LaunchAgents These are where most such items reside. However, if you use something like fink or macports, they can install in their own directories, in an attempt to minimize polluting the system. Supperconductor 1 Link to comment
wgscott Posted May 28, 2017 Author Share Posted May 28, 2017 12 minutes ago, Yucca06 said: Why don't you simply use computer audio design scripts ? They work perfectly for Yosemite, you just don't have to "upgrade" to Sierra. All the emails I have got from people asking me for help unfucking their computer after using these kinds of scripts sort of puts me off. I have no evidence that they know what they are doing, and much evidence the users run these commands blindly. Link to comment
wgscott Posted May 28, 2017 Author Share Posted May 28, 2017 1 hour ago, Ralf11 said: Can anything be captured in Activity Monitor? Say, the all processes list under the Memory Use tab? Yes, but be sure to set it to display system commands, not just for your user. It is in essence a GUI for the output of the unix top command. Also, if you want to see what launchd items are loaded: launchctl list Link to comment
wgscott Posted May 29, 2017 Author Share Posted May 29, 2017 4 minutes ago, AudioDoctor said: < is happily listening to an Aurender device... WTF? This is computer audiophile. Do you have one of those robots that has sex for you too? AudioDoctor 1 Link to comment
wgscott Posted May 29, 2017 Author Share Posted May 29, 2017 1 hour ago, Ralf11 said: wow - Activity Monitor is showing about 5 pages of system & user processes running if others have a similar number, this could be a difficult approach And probably completely pointless. That is why I want to try to identify specific potential offenders, especially if they have no real importance, and selectively identify and disable them. In other words, I want to do as little "customization" as possible. Link to comment
wgscott Posted May 29, 2017 Author Share Posted May 29, 2017 3 hours ago, Jim Smith said: Cocktail for Mac? I think that one is pretty safe to use. Link to comment
wgscott Posted May 30, 2017 Author Share Posted May 30, 2017 With something like Audirvana restarting being recorded in the log file, there is an objective measure of something -- frequency of pauses -- that helps to quantify whether turning something off makes an improvement. When it comes to simply evaluating sound quality, it become vastly more difficult, and I think I would spend a lot of time second-guessing everything. It seems like launchd constantly spawning processes that abort and restart is much more likely to be problematic than processes that start and remain dormant. For some stupid reason I am now getting a string of these: com.apple.periodic-monthly: scheduler_evaluate_activity told me to run this job; however, but the start time isn't for 2583797 seconds. Ignoring. WTF? cron never had this issue. I'm just going to issue sudo periodic monthly and hope it goes away (for a month). Link to comment
wgscott Posted June 13, 2017 Author Share Posted June 13, 2017 1 hour ago, CuteStudio said: I just look in the Activity Monitor program at CPU and Disk usage. If it's not using much CPU, it's not going affect anything. That is the assumption that I have always made, but it seems that for two types of processes, this might not be true (or at least might not scale linearly with CPU use): (1) mdfind/spotlight indexing and associated processes (perhaps because of i/o accessing resource forks) (2) launchd failures that constantly try to restart. Since I declared war on these, my audirvana issue has pretty much disappeared. These might consume CPU so transiently that they don't show up within the sampling interval of top/activity monitor. Link to comment
wgscott Posted June 13, 2017 Author Share Posted June 13, 2017 Also, I can do the opposite -- max all the processors out compiling something or doing some calculation in parallel, and it doesn't do anything nasty to playback. Link to comment
wgscott Posted June 13, 2017 Author Share Posted June 13, 2017 51 minutes ago, CuteStudio said: Not had any launchd failures - but I'm probably a heavy - but - conservative user. I.e. I hammer it with Xcode, Chrome and my music software testing but don't tend to use many other programs. Check /var/log/system.log You might get a little surprise. BTW, Activity Monitor is a gui for the unix top program. Link to comment
wgscott Posted June 20, 2017 Author Share Posted June 20, 2017 15 minutes ago, jamesg11 said: Well, I'm on on sd card boot Why? That might be the source of your problems. 16 minutes ago, jamesg11 said: an accumulative list there of delete-able processes would be great, You've missed the point of the thread. 16 minutes ago, jamesg11 said: If it can be expunged, it should be expunged! Why? What is the basis for this claim? Link to comment
wgscott Posted June 20, 2017 Author Share Posted June 20, 2017 On 6/16/2017 at 1:09 AM, Bob Stern said: In iTunes Prefs > Devices, did you enable "Prevent iPod, iPhone, iPad from syncing automatically"? Yes. (The launchd item in question also detects when an iPod is plugged in via USB, so if you want to do that, you have to turn it back on manually.) Link to comment
wgscott Posted June 20, 2017 Author Share Posted June 20, 2017 On 6/16/2017 at 1:13 AM, Bob Stern said: How did you find those in the log? Did the entries begin with "launchd:"? I don’t have any launchd entries in the Console log. grep on "launch" i.e., grep launch /var/log/system.log Link to comment
wgscott Posted June 20, 2017 Author Share Posted June 20, 2017 8 hours ago, Bob Stern said: Thanks, Bill. I just figured out that I've been misusing the Console GUI app for years! I had been looking at "All Messages" under the heading "System Log Queries" in the Console sidebar. The correct System log that you identified is the first entry under FILES in the Console sidebar. I overlooked it for years because it is grayed out if you are logged in as a non-admin user, as I normally do. Logging into an admin account, I can open /var/log.system.log in the Console GUI app. Typing launchd in the search box, I now see numerous launchd entries. (Omitting the d includes LaunchServices entries.) It's disappointing to see so many Apple processes that cause errors. A very simple way to keep an eye on things in real-time: tail -9999cf /var/log/system.log Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now