MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Mon, Mar 23, 2015 10:53 pm

Capturing output from Terminal on OS X

If you wish to capture the contents of the Terminal window on OS X, e.g., if you are running the top command and would like to capture a snapshot of what is in the terminal window, but would like to have that information in text format, rather than as an image file, which is what you would get if you used Preview and chose "File" and then "Take Screen Shot", you can use Command-S from the Terminal window. You will be prompted as to where you wish to save the file; the default file name is Terminal Saved Output in the Documents folder for the account you are logged in under. When you choose "Save", if the file exists, you will see the message below:

"Terminal Saved Output" already exists.

A file or folder with the same name already exists in the folder Documents. Replacing it will overwrite its current contents.

Cancel   Replace

If you choose "Replace" the contents of the current Terminal tab will be written to the file, including the scrollback buffer, i.e., all of the information displayed in the window for the current Terminal tab, even what is not shown on the screen unless you scroll upwards, is recorded to the file.

So, if I wanted to capture the current output of top -o cpu, I could hit the Command and S keys to save the displayed information and then edit out anything from the scrollback buffer to have something like what is shown below.

$ top -o cpu

Processes: 147 total, 7 running, 3 stuck, 137 sleeping, 831 threads   22:35:37
Load Avg: 3.28, 3.22, 3.24  CPU usage: 84.86% user, 15.13% sys, 0.0% idle
SharedLibs: 484K resident, 0B data, 0B linkedit.
MemRegions: 147433 total, 1663M resident, 37M private, 558M shared.
PhysMem: 849M wired, 1613M active, 1597M inactive, 4059M used, 36M free.
VM: 318G vsize, 1026M framework vsize, 33663121(1) pageins, 8539859(0) pageouts
Networks: packets: 19460598/11G in, 27466428/5435M out.
Disks: 19736694/473G read, 9899513/434G written.

215    firefox      83.9 308 hrs  71/1 3    428+  90860- 967M-  82M    1143M-
27     opendirector 66.7 61:34:17 12/1 12/1 709   229    3780K  1936K  7116K
33110  top          21.3 00:02.19 1/1  0    24    33     1904K  216K   2652K
124    WindowServer 12.6 15:23:27 4/1  1    738+  23303+ 15M-   172M+  141M+
213    Terminal     6.0  09:50.46 10   5    214   933+   16M+   12M+   35M+
13601  Preview      5.4  01:11.19 3    1    661   2642+  45M-   69M+   86M+
0      kernel_task  2.5  06:57:45 87/2 0    2     851    30M    0B     461M+
29265- Microsoft En 1.4  12:06:51 14   3    440   2139   100M   65M    163M
55     hidd         0.6  27:51.88 5/1  3/1  92    67     620K   312K   1788K
15258- Microsoft Po 0.3  73:07.63 5    3    188   986    12M    36M    33M
221-   Microsoft Wo 0.3  01:54:36 5    3    155   963    31M    45M    57M
229-   My Day       0.2  01:46:08 6    1    167   447-   13M-   33M    36M-
210-   Microsoft Ex 0.1  77:31.36 5    3    206   2356   58M    93M    101M
68-    dsAccessServ 0.1  51:10.38 14   3    152   204    1456K  1764K  6032K
71-    LANrev Agent 0.0  27:48.38 13   2    242+  90+    2540K+ 1932K  2912K+
69     SymDaemon    0.0  05:33:54 16   1    1187  434    18M    2568K  26M
651    java         0.0  26:11.37 20   1    274   331    17M    4196K  20M
10267  VMware Fusio 0.0  03:59.72 9    1    265   529    3900K  17M    13M
613-   Microsoft Da 0.0  64:23.94 3    1    106   239    76M    22M    93M

[/os/os-x] permanent link

Fri, Mar 20, 2015 5:59 pm

AMPAgent using excessive percentage of CPU

A MacBook Pro laptop I was using was responding horribly slowly even for simple tasks. When I ran top to observe the percentage of CPU usage by process, I found AMPAgent was using a high percentage of the CPU cycles, going up to 75% at times.
$ top

Processes: 146 total, 4 running, 15 stuck, 127 sleeping, 840 threads  16:28:35
Load Avg: 2.66, 2.70, 2.77  CPU usage: 79.61% user, 20.38% sys, 0.0% idle
SharedLibs: 484K resident, 0B data, 0B linkedit.
MemRegions: 149522 total, 1684M resident, 36M private, 591M shared.
PhysMem: 889M wired, 1605M active, 1506M inactive, 4000M used, 95M free.
VM: 316G vsize, 1026M framework vsize, 29238312(0) pageins, 7714467(0) pageouts
Networks: packets: 18571867/10G in, 26865711/5268M out.
Disks: 17358834/424G read, 8677032/391G written.

95944  imklaunchage 0.0  00:04.62 2    1    68   50     184K   1556K  1204K
94149  plugin-conta 0.0  00:04.63 4    1    114  185    576K   30M    9320K
72763  cookied      0.0  00:01.68 2    1    50   42     356K   228K   892K
66565  geod         0.0  00:00.07 2    1    34   47     116K   216K   2512K
65412  vim          0.0  00:00.01 1    0    21   28     0B     216K   132K
65345  bash         0.0  00:00.12 1    0    21   27     4096B  732K   132K
65343  login        0.0  00:00.75 2    1    33   62     0B     256K   2268K
59625- AMPAgent     62.1 135 hrs  5/1  0    25   67     32K    216K   300K
47946  CIJScannerRe 0.0  03:43.18 5    1    108- 80     484K   4684K  3876K
47943  Image Captur 0.0  00:15.50 3    1    110  97     1640K  5000K  5620K
45203  diskimages-h 0.0  00:09.08 3    1    94   69     2964K  3512K  4488K
45160  hdiejectd    0.0  00:05.25 2    1    32   42     252K   248K   1296K
29384- Alerts Daemo 0.0  00:42.48 4    2    99   483    1128K  5528K  2164K
29265- Microsoft En 1.3  10:05:43 14   3    444  2061   92M    97M    163M
28815  ssh-agent    0.0  00:53.46 3    1    52   50     396K   360K   1488K
28702  bash         0.0  00:02.50 1    0    21   27     1176K  732K   1744K
28701  login        0.0  00:00.83 2    1    33   62     0B     256K   2228K
27960- Microsoft Au 1.5  01:50:06 7    2    157  232    1708K  14M    5524K
27514  iTunesHelper 0.0  00:07.47 3    1    63   73     336K   2324K  2128K

Searching the disk drive for it I found that it was associated with the Dell KACE software on the system, which is used for software management on the system.

$ find / -name AMPAgent 2>/dev/null
/Library/Application Support/Dell/KACE/bin/AMPAgent

I killed the AMPAgent process and found that it restarted, but was no longer using so much of the CPU's cycles.

$ sudo kill -HUP 59625
$ ps -A | grep AMP | grep -v grep
14018 ??         0:00.34 /Library/Application Support/Dell/KACE/bin/AMPAgent

At AMPAgent can utilize too much CPU on MAC and Windows on agent (126339) on the Dell Software Support site, I found Dell noting that the 5.5 version of the agent may experience issues with high CPU usage. The suggested fix was to upgrade to version 6.0 of the agent, which wasn't an option for me on the laptop, since control of the KACE servers and the KACE software deployed to client systems was under the purview of others. But I did verify that the version of the software was an older version, 5.4.10622; you can get the version number by using AMPAgent --help.

$ "/Library/Application Support/Dell/KACE/bin/AMPAgent" --help
Usage: /Library/Application Support/Dell/KACE/bin/AMPAgent -h <hostname> [-p <port>] [-d]

    -h|-host   : hostname of server
    -p|-port   : port of server

    -d|-debug  : include debug output in logs
    -w|-write  : write a default amp.conf file

    /Library/Application Support/Dell/KACE/bin/AMPAgent -h kbox
? 2009-2012 Dell Inc.
KACE Agent AMP client version 5.4.10622

[/os/os-x] permanent link

Wed, Mar 11, 2015 10:21 pm

Freezing the top row in Microsoft Excel 2008 for Mac

If you wish to "freeze" a top header row in Microsoft® Excel® 2008 for Mac so that the row remains visible even when you need to scroll down through many rows, click in cell A2 then click on Window on the menu bar at the top of the Excel window and select Freeze Panes. If you later want to revert back to the original behavior where the top row does not always remain visible when you scroll down through the spreadsheet, you don't need to click on any particular cell beforehand, but can select Window and then Unfreeze Panes.

If you wish to have multiple rows remain visible when you scroll through the spreadsheet, you can click on a row below those you wish to remain visible and then click on Window and Freeze Panes. E.g., if you wished the top 5 rows to always be shown even when you've scrolled far below them, you could click on row 6 and then Window and Freeze Panes.

If you wished the top row and left-most column to always be visible, you could click on cell B2 and then Window and Freze Panes. Then if you scroll down through the spreadsheet, row number 1 will always be visible and if you scroll right, column A will also remain visible.

[/software/office] permanent link

Thu, Mar 05, 2015 8:04 pm

Calc and datedif

The Apache OpenOffice spreadsheet program Calc as of the current 4.1.1 version does not provide the DATEDIF function found in Microsoft Office Excel and Google Sheets. The datedif function can be used to calculate the number of days between two dates in Excel.

Calc does provide a NETWORKDAYS function, but that gives you the number of work days between two dates. I.e., weekends are excluded.


Returns the number of workdays between a start date and an end date. Holidays can be deducted.


NETWORKDAYS(StartDate; EndDate; Holidays)

StartDate is the date from when the calculation is carried out. If the start date is a workday, the day is included in the calculation.

EndDate is the date up until when the calculation is carried out. If the end date is a workday, the day is included in the calculation.

Holidays is an optional list of holidays. These are non-working days. Enter a cell range in which the holidays are listed individually.


How many workdays fall between 2001-12-15 and 2002-01-15? The start date is located in C3 and the end date in D3. Cells F3 to J3 contain the following Christmas and New Year holidays: "2001-12-24", "2001-12-25", "2001-12-26", "2001-12-31", "2002-01-01".
=NETWORKDAYS(C3;D3;F3:J3) returns 17 workdays.

However, the DATEDIF function isn't needed to calculate the number of days between two dates in Calc. Instead, you can simply subtract the two dates. E.g., if cell B18 contains the date January 1, 2014 and cell B19 contains the date March 4, 2015, you could place the formula =B19 - B18 in the cell where you want to store the number of days between the two dates. Unless you change the formatting of the cell to be something other than a number, you will see 427 as the value in the cell with that formula given the stated dates. That forumula will produce a result equivalent to DATEDIF(Start_Date,End_Date,"d") in Excel.

[/software/openoffice] permanent link

Thu, Mar 05, 2015 2:09 pm

Referencing a Google sheet with a space in the name

If you are using Google Sheets, which is Google's free, web-based spreadsheet program, for a spreadsheet and need to reference a sheet in a workboook that has a space in the name from another sheet, you need to enclose the name of the sheet in single quotes. E.g., if I have a sheet named 2014 MoonPoint and need to reference a cell, e.g., D292, in that sheet from another sheet, I could use '2014 Moonpoint'!D292 to reference the cell from which I need to obtain information. You will also need to use single quotes to enclose the name if you have other non-alphanumeric characters in the name, i.e., if you use other characters besides letters and numbers in the name.

[/network/web/services/google] permanent link

Tue, Mar 03, 2015 10:54 pm

Displaying Google Chrome browser information with chrome://

You can reveal a lot of internal Google Chrome browser information by putting chrome:// in the Chrome address bar.

E.g., Google Chrome maintains its own internal DNS cache. You can display the entries in that cache by putting chrome://dns in the address bar for Chrome. When you do so, you will see information similar to that displayed below:

Future startups will prefetch DNS records for 10 hostnames
Host nameHow long ago

You will also see a page load count for web pages.

If you put chrome://downloads/ in the address bar you will see a list of the recently downloaded files and the URLs that were used to download them as well as the dates on which the files were downloaded..

You can view Chrome's history information showing a list of recently visited pages with the days and times they were visited with chrome://history/.

You can see information on Chrome's memory utilization, including the amount of memory used by each Chrome tab using chrome://memory. That will also reveal the amount of memory used by other browsers, such as Internet Explorer and Firefox, that are open on the system. E.g., this is an example from a Windows 7 system where 3 tabs are open within Chrome, one for Wikipedia, one for Google, i.e.,, and one for chrome://memory itself, which is labeled "About Memory". The tabs are identified by Tab at the beginning of the name. IE 11 and Firefox 35.0.1 are also open on the system and so information about their memory utitlization is also displayed.


  1. 12 Most Useful Google Chrome Browser chrome:// Command
    By Ramesh Natarajan
    Date: October 12, 2011
    The Geek Stuff

[/network/web/browser/chrome] permanent link

Mon, Mar 02, 2015 11:06 pm

Setting Chrome as the default browser

To set Chrome as the default browser, take the following steps:
  1. Click on the menu bar, which is 3 horizontal bars one beneath the other at the top right of the Chrome window. Chrome menu bar
  2. Select Settings.
  3. Click on the Make Google the default browser.
  4. On a Windows system, you may see a window asking "How do you want to open this type of link (http)?" which shows the other browsers on the system that can be used to access websites. Click on Google Chrome

    Browser list for
opening http links

When you do that, the HKEY_CLASSES_ROOT\http\shell\open\command is updated as shown below when the query was run before and after the default browser was changed from Internet Explorer to Google Chrome on a Windows Server 2012 Essentials system.

C:\>reg query HKEY_CLASSES_ROOT\http\shell\open\command /ve

    (Default)    REG_SZ    "C:\Program Files\Internet Explorer\iexplore.exe" %1

C:\>reg query HKEY_CLASSES_ROOT\http\shell\open\command /ve

    (Default)    REG_SZ    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"

If Firefox is the default browser, the value will be similar to the following, depending on where you installed Firefox:

"C:\Program Files\Mozilla Firefox\firefox.exe" -osint -url "%1"


  1. Determining the default browser from the command line
    Date: July 18, 2014
    MoonPoint Support

[/network/web/browser/chrome] permanent link

Sun, Mar 01, 2015 9:56 pm

Adobe Acrobat - Import trusted certificates from prior version

When I upgraded Adobe Reader on a user's Microsoft Windows 7 system from version X (10.1.12) to XI (11.0.10), I saw an Adobe Reader Security window open with the following prompt when I started Adobe Reader 11 from the administrator account after upgrading the software:

Trusted certificates from your previous version of Adobe Reader were found. Would you like to import them?

Any certificates that are not imported in this step will not be available in this version of Adobe Reader.

Adobe Reader - Import previous trusted certificates?

At Security (Digital Signatures), I found the following explanation in the Addressbook Import section:

The address book stores data for certificates used in digital signature and certificate encryption workflows. During a major upgrade (e.g. 10.x to 11.x), the product looks for existing address books on each user machine. Prior to install, you should decide whether to deploy a generic, enterprise address book or let the existing address book on each machine be imported into the new product. By default, when end users first launch the product, the application prompts them to import any discovered address book. The application looks for existing addressbooks from previous product versions by searching directories in this order.

I checked to see if any of the files existed from prior versions for the administrator account, but didn't see any.

C:\>echo %APPDATA%

C:\>dir %APPDATA%\Adobe\Acrobat\11.0\addressbook.acrodata
 Volume in drive C is OS
 Volume Serial Number is 4445-F6ED

 Directory of C:\Users\Administrator\AppData\Roaming\Adobe\Acrobat\11.0

File Not Found

C:\>dir %APPDATA%\Adobe\Acrobat\10.0\addressbook.acrodata
 Volume in drive C is OS
 Volume Serial Number is 4445-F6ED

 Directory of C:\Users\Administrator\AppData\Roaming\Adobe\Acrobat\10.0

File Not Found

C:\>dir %APPDATA%\Adobe\Acrobat\9.0\addressbook.acrodata
The system cannot find the file specified.


I didn't see any for the administrator's account, so then checked the user's account, but did not see any there, either.

C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\9.0\addressbook.acrodata
 Volume in drive C is OS
 Volume Serial Number is 4445-F6ED

 Directory of C:\Users\Pamela\AppData\Roaming\Adobe\Acrobat\9.0

File Not Found

C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\10.0\addressbook.acrodata
 Volume in drive C is OS
 Volume Serial Number is 4445-F6ED

 Directory of C:\Users\Pamela\AppData\Roaming\Adobe\Acrobat\10.0

File Not Found

C:\>dir \Users\Pamela\AppData\Roaming\Adobe\Acrobat\11.0\addressbook.acrodata
The system cannot find the file specified.


Since the system had Adobe Acrobat 9.0 on it for creating PDF files as well as now having Adobe Reader 11.0, I checked the last directory in the list of possible locations as well, but didn't see anything there, either.

C:\>dir "c:\program files (x86)\Adobe\Acrobat 9.0\Acrobat\Replicate"
 Volume in drive C is OS
 Volume Serial Number is 4445-F6ED

 Directory of c:\program files (x86)\Adobe\Acrobat 9.0\Acrobat

File Not Found


So it seems the prompt may appear even if there are no prior certificates to import. I clicked on the Import button anyway, though.

[/os/windows/software/pdf/acrobat] permanent link

Sun, Mar 01, 2015 7:54 pm

Checking the status for Time Machine backups with bash

I connected an external USB drive to an iMac running OS X 10.6.8 for Time Machine backups. Two of the three USB ports were occupied by a keyboard and mouse and I plugged the drive into the only remaining USB port. The user has another USB drive she sometimes connects to the system temporarily. I wanted a way to be able to confirm from a terminal window or a shell prompt via a remote SSH connection that the external drive I set up for Time Machine backups had been reconnected and contained a recent Time Machine Backup. I found several scripts for checking the status of Time Machine backups at "Script check Time Machine Backups and report how long since last good backup on Client Daily Report". I chose a Bash script posted there by Devin. I've copied the script here.

From a Terminal window on the iMac I downloaded the Bash script, check-time-machine-currency, to the user's application directory, /Users/pam/Applications, with curl and made it executble with chmod +x. When the script is run, you need to provide a parameter to it specifying the number of minutes you wish to use for the recency check; the script reports if a backup has completed within a number of minutes of the current time using the value you provide for the number of minutes on the command line. If you run the scipt without providing that number, an error message will be displayed. Below I specified two days, i.e., 2,880 minutes (there are 1,440 minutes per day).

Pams-Computer:Applications pam$ curl
uter_languages/bash/check-time-machine-currency -o check-time-machine-currency
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3828  100  3828    0     0   3151      0  0:00:01  0:00:01 --:--:--  5871
Pams-Computer:Applications pam$ chmod +x check-time-machine-currency
Pams-Computer:Applications pam$ ./check-time-machine-currency
ERROR - You must provide a critical threshold in minutes!
Pams-Computer:Applications pam$ ./check-time-machine-currency 2880
Running on pre-Mavericks.
OK - A Time Machine backup has been taken within the last 2880 minutes. (Sun Mar
  1 17:14:33 EST 2015)
Pams-Computer:Applications pam$ date
Sun Mar  1 17:33:15 EST 2015
Pams-Computer:Applications pam$

The script informed me that a backup had been taken within the last 2,880 minutes; the last backup had been made at 17:14:33, i.e., 5:14 PM, which was less than 20 minutes before I ran the command at 5:33 PM.

[/os/os-x] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo