Nine41 Consulting | Adjust the LANDESK Mac SDCache Purge Schedule
apple, device management, dep, vpp, systems management, landesk, ivanti, lanrev, absolute, heat, mdm,
973
post-template-default,single,single-post,postid-973,single-format-standard,qode-quick-links-1.0,ajax_fade,page_not_loaded,,columns-3,qode-child-theme-ver-1.0.0,qode-theme-ver-11.0,qode-theme-bridge,wpb-js-composer js-comp-ver-5.1.1,vc_responsive
 

Adjust the LANDESK Mac SDCache Purge Schedule

Adjust the LANDESK Mac SDCache Purge Schedule

In my previous post, I discussed how you could push down a script to a Mac to clean up the LANDESK SDCache folder, potentially recovering precious hard drive space.

This script process described previously, while quick and efficient, is more of a band-aid and doesn’t necessarily address the problem of binaries being kept too long on the Mac – especially those with super small hard drives.

While having an SDCache folder full of binaries can be helpful, especially on bandwidth constrained networks as other clients can pull directly from that local Mac as opposed to the source file share, you may find you just need to shorten the number of days some of your Macs keep files within the SDCache folder to save yourself the headaches from the help desk calls complaining that their machine is out of hard drive space.

The XML file that controls the schedule for the SDCache purge is located in the /Library/Application Support/LANDesk/scheduler folder and is titled ldcron-sdclean.xml.

scheduler

If you crack that file open with a text editor, you’ll notice it contains the same command line text we used to purge the SDCache folder manually.

All you need to do is copy off the ldcron-sdclean.xml file from one of your machines or download an example from my GitHub repository, and adjust the -mtime +45 to align with your needs.  Setting a value of +10 will tell LANDESK to purge any file within the SDCache folder older than 10 days, +3 would purge any file older than 3 days and so on.  So set the appropriate value, using your favorite text editor, and then save the updated file to one of your file repository shares.

Now we need to create a Mac package to deploy out the updated ldcron-sdclean.xml file to all of the Macs that need to be updated.  I’ve written a script, again available on my GitHub page, titled changeSDCachePurgeTime.sh that will do exactly that. Basically, it uses the LANDESK sdclient tool to download the XML file and place it into the /Library/Application Support/LANDesk/scheduler folder.

In order for you to use the script, you just need to change the fileToCopy variable path to match the location you saved your ldcron-sdclean.xml file to.  Other than that, it should be totally ready to go.

If you decide to write your own script, just make sure you set the execute permissions on the file prior to copying it to your file share.

Now you’re ready to create your Mac package and deploy.  The directions to so do are below.

Creating LANDESK Management Suite Mac Packages

  1. Open the LANDESK Console
  2. Navigate to the top menu bar, select Tools > Distribution > Distribution Packages.
  3. In the lower left menu tree, highlight My Packages or Public Packages from within the Distribution Packages window
  4. On the Distribution menu bar, press the New Package button and select New Macintosh Package.
  5. Give the package a name
  6. Provide a description as well as any metadata information desired
  7. Set the primary file to the script file you previously transferred to your package share
  8. Fill out the Metadata details if desired, specifically supplying a logo so it shows up properly in the portal
  9. Save the package

Creating a Scheduled Mac Software Distribution Task

  1. Right click on the Mac software distribution package created and select Create Scheduled Task
  2. From the network view, select and drag the desired machine(s), user(s) or query(ies) and drop them onto the task
  3. Now, right click on the task and select properties
  4. Set the desired Task type under Task Settings as to whether you want a push, a policy or a hybrid of the two types in a policy-supported push
  5. Set the radio button in the Portal Settings to either Recommended or Optional if you desire to put the package into Workspaces.  If you’d like to automatically deploy the app, select Run automatically
  6. Change the Reboot Settings or Distribution and Patch settings if desired
  7. Set the schedule task settings with the appropriate start time

Problem totally solved, right?

Well, not quite.  If at any time in the future you redeploy the LANDESK Mac agent, the ldcron-scheduler.xml file will be overwritten with the default +45 day value.  You could always write a custom definition, if you’re a LANDESK Patch customer, and watch for that value and remediate if detected.  However, that may be more work than its worth to you, if you only have a couple of machines you’re concerned about.  So just be cognizant that an agent deployment will reset the value and redeploy your package if need be.

 

No Comments

Post A Comment

ARE YOU READY TO GET STARTED?
Please fill out your information, and a specialist will reach out to discuss our services in more details.
Your Information will never be shared with any third party.
        
Free Training Videos
Register to gain access to all of our free content.
YOUR PHONE
YOUR NAME
YOUR EMAIL
        
Get Started
Provide us your contact information and we will reach out as quickly as possible.
YOUR PHONE
YOUR NAME
YOUR EMAIL
        
Additional Questions?
Provide us your contact information and we will reach out as quickly as possible.
YOUR PHONE
YOUR NAME
YOUR EMAIL
        
Pay by PO?
Provide us your contact information and we will reach out to help you sign up by PO.
YOUR PHONE
YOUR NAME
YOUR EMAIL
Subscribe Now
Subscribing to our site gives you access to our Apple Admin 101 training videos as well as allowing us to notify you of each new blog post we release.
YOUR PHONE
YOUR NAME
YOUR EMAIL
Pay by PO
Send us your contact information and we will reach out to help you sign up by PO.
YOUR PHONE
YOUR NAME
YOUR EMAIL
Additional Questions?
Send us your contact information and your questions and we will reach out as quickly as possible.
YOUR PHONE
YOUR NAME
YOUR EMAIL
YOUR QUESTIONS
Get Started
Provide us your contact information and we will reach out as quickly as possible.
YOUR PHONE
YOUR NAME
YOUR EMAIL
Free Training Videos
Subscribing to our site gives you access to our Apple Admin 101 training videos as well as allowing us to notify you of each new blog post we release.
FIRST NAME
LAST NAME
PHONE
EMAIL
Subscribe Now
Subscribing to our site gives you access to our Apple Admin 101 training videos as well as allowing us to notify you of each new blog post we release.
FIRST NAME
LAST NAME
PHONE
EMAIL