Difference between revisions of "Ajcody-General-Notes"
(Moving category tag -- internal article tag was preventing category from being recognized by wiki.)
|Line 1:||Line 1:|
|Line 196:||Line 198:|
Revision as of 23:21, 19 September 2008
- 1 General Notes
- 1.1 Actual General Notes Homepage
- 1.2 Zimbra Variables
- 1.3 Zimbra Contact Fields For CSV Import Mapping
- 1.4 What's My Server Like
- 1.5 Restarting Jetty - ZCS 5+
- 1.6 Get Version From Ajax Client
- 1.7 What's Compiled With Postfix
- 1.8 REST Information
- 1.9 Server Source Doc's
- 1.10 Trouble Shooting Memory Issues
Actual General Notes Homepage
Please see Ajcody-General-Notes
Ways to check on different zimbra variables.
su - zimbra zmlocalconfig -i zmlocalconfig -d cd /opt/zimbra/conf/attrs more zimbra-attrs.xml cd /opt/zimbra/openldap/etc/openldap/schema/ more zimbra.schema
Zimbra Contact Fields For CSV Import Mapping
Please see /opt/zimbra/conf/zimbra-contact-fields.xml
This will show you what "fields" Zimbra is looking for and mapping to in regards to importing from another applications contact csv files.
One easy way to do this is the following:
- From zimbra ajax client as a test user (or any old user) do an export Addressbook.
- This is under the preference tab > Address Book > Import / Export > Export - select Addressbook and click Export button
- Then open file file something like Excel or a Text Editor
- Your only interested in the Top line - that gives the default fields for a Zimbra Addressbook.
- You'll get something like this:
- Note, ordering [left to right] isn't important. What is important, is the data lines up under the right column header.
- With your other Mail system, export the addressbook to a csv file.
- Open this file in another Excel window.
- Copy the column data from the one Excel sheet and paste it into the appropriate column within the Zimbra Excel sheet.
- Move as much as you can and then save.
- For example:
"company","companyPhone","email2","fileAs","firstName","homepageURL","imAddress3","lastName","otherIMLabel","workCity","workCountry","workEmail2","workEmail3","workEmail4","workEmail5","workPostalCode","workState","workStreet" "Apple Computer Inc.","1-800-MY-APPLE","","3","","http://www.apple.com","","","","Cupertino","United States","","","","","95014","CA","1 Infinite Loop"
- Now you can try importing this csv file back into Zimbra.
- Either with the webclient or you can use some on the CLI commands
- See User_Migration for variations of CLI commands that could be used.
- Here's the documented example:
curl -u schemers:password --data-binary @/tmp/new.csv http://server/service/home/schemers/contacts?fmt=csv
Example Header For Horde Contacts
I have not used this myself, I found it on the forums.
I'm hoping the forum user simply renamed the top header column to match description fields that Zimbra knows and that it's in order of the data (left to right) that Horde normally exports in. You'll need to review it and make sure it fits with your exported data columns from Horde.
What's My Server Like
To dump out your server details, these commands are useful.
zmprov gs yourdomainname zmprov gacf zmlocalconfig zmdumpenv
Another good document to review for "odd performance" issues is the large server wiki.
Restarting Jetty - ZCS 5+
Get Version From Ajax Client
Put the below in the search field of the Ajax client:
What's Compiled With Postfix
Do the following (return is from my test box):
postconf -m btree cidr environ hash ldap mysql pcre proxy regexp static unix
Resources to review
- Rest Overview
- For queries:
- Working Examples
Format to get around permission denied on multi-domain hosting servers
If you getting permission denied rather than resource not found...try this format example:
I but both in case one issue is where the username has special characters, like the period.
Server Source Doc's
Trouble Shooting Memory Issues
Basic Commands To Gather Data
Try adjusting the ps output:
ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww --sort=pid
- RSS (Resident Set Size) - The portion of a process that exists in physical memory (RAM). The rest of the program exists in swap. If the computer has not used swap, this number will be equal to VSIZE. RSS per unit time will show how much RAM the process is using over time.
- VSIZE (Virtual memory SIZE) - The amount of memory the process is currently using. This includes the amount in RAM and the amount in swap. VSIZE per unit time will show how large the process is over time.
- [ -o ] Disables the display of a "buffer adjusted" line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported.
- "Memory Used" per unit time will show the "Memory Used" asymptotically approach the total amount of memory in the system under heavy use. This is normal, as RAM unused is RAM wasted.
- "Memory Used - Memory Buffered - Memory Cached" per unit time will give a good sense of the memory use of your applications minus the effects of your operating system. As you start new applications, this value should go up. As you quit applications, this value should go down. If an application has a severe memory leak, this line will have a positive slope.
- "Swap Used" per unit time will display the swap usage. When the system is low on RAM, a program called kswapd will swap parts of process if they haven't been used for some time. If the amount of swap continues to climb at a steady rate, you may have a memory leak or you might need more RAM.
You could also use watch with free to poll it:
watch -n 1 -d free
Top is nice, put you want to save output. Do the [-b batch] and [-n number of iterations] variables:
top -b -n1 > /tmp/top-output.txt
Gives a good overview as well:
- The process-related fields are:
- r — The number of runnable processes waiting for access to the CPU
- b — The number of processes in an uninterruptible sleep state
- w — The number of processes swapped out, but runnable
- The memory-related fields are:
- swpd — The amount of virtual memory used
- free — The amount of free memory
- buff — The amount of memory used for buffers
- cache — The amount of memory used as page cache
- The swap-related fields are:
- si — The amount of memory swapped in from disk
- so — The amount of memory swapped out to disk
- The I/O-related fields are:
- bi — Blocks sent to a block device
- bo— Blocks received from a block device
- The system-related fields are:
- in — The number of interrupts per second
- cs — The number of context switches per second
- The CPU-related fields are:
- us — The percentage of the time the CPU ran user-level code
- sy — The percentage of the time the CPU ran system-level code
- id — The percentage of the time the CPU was idle
Polling data with vmstat:
vmstat 1 10<pre>
- Displays one new line per second, but only for the next ten seconds
See below for description of the output for meminfo:
Do the following:cat /proc/meminfo