Excel tips

Read More

Freezing Rows and Columns

If you have a lengthy spreadsheet containing tons of data, you may have to scroll too far down or even across to view it all. This means you will lose sight of your headings and find yourself constantly scrolling back to see them. However, if you freeze the rows and columns, then those headers will remain as you move through your spreadsheet.

  1. Navigate to the View tab and select Freeze Panes on the ribbon.
  2. In the Freeze Panes dropdown, select Freeze Top Row, Freeze First Column, or choose both if needed.

tips to save time in microsoft excel

Now when you scroll up, down, right, or left, you will notice your headers will remain visible. To unfreeze those rows and columns, just select Freeze Panes command again and click Unfreeze Panes. How to Manage Columns in Excel How to Manage Columns in Excel Do you need to add, move, hide, or change columns in a complex spreadsheet? Don’t panic. We’ll show you basic Excel column operations to organize your data. Read More

Note that in older versions of Excel, the process is a bit different. Select the cell that is common to both the row and column you want to freeze and then click Freeze Panes.

Operating the Fill Handle

The fill handle in Excel can be a huge time-saver when you need to populate multiple cells and there are a few different ways this feature can be used. First, you can quickly create a list of numbers that count up by entering 1 into the first cell and 2 in the cell below it. Then, select both cells and when the fill handle appears, just drag to populate the cells as needed.

tips to save time in microsoft excel

When using the feature for dates, you can easily fill a column or row in increments of one day. For instance, you can enter 12/25/16 into the cell, select that cell, and when the fill handle appears just drag to add subsequent dates. This maneuver also works with days of the week and months of the year as well as downward through a column and across through a row.

tips to save time in microsoft excel
Another handy use for the fill handle is if you need to populate an entire column with the same value for your spreadsheet. If you enter a word or letter, for example, select the cell and double-click the fill handle. This will enter that value into the remaining cells of the column as far down as your spreadsheet has data. How To Save Time In Excel By Using The Fill Handle How To Save Time In Excel By Using The Fill Handle Read More

Transposing Columns and Rows

If you have a spreadsheet using headings in columns or rows (or both) and decide they would work better the opposite way, there is an easy process to make the change. This saves you from having to retype those headings. Here are the steps to move cells from row headings to column headings.

  1. Select the cells in the column that contain the headings.
  2. Either right-click and select Copy or click the Copy button on the Home tab of the ribbon.
  3. Select the cell in the row and column where you want the headings to start.
  4. Either right-click and select Paste Special or click Paste and then Paste Special on the Home tab of the ribbon.
  5. Select the checkbox near the bottom right that says Transpose.
  6. Click OK.

tips to save time in microsoft excel

Accessing the Calculator

While you may use an add-in that pops a calculator into the sidebar of your spreadsheet, you can also take advantage of the built-in calculator feature. This is convenient when you want to perform quick calculations that are not formulated into your spreadsheet. And you can add the calculator to either your ribbon or Quick Access toolbar. Doing Your Taxes? 5 Excel Formulas You Must Know Doing Your Taxes? 5 Excel Formulas You Must Know It’s two days before your taxes are due and you don’t want to pay another late filing fee. This is the time to leverage the power of Excel to get everything in order. Read More

To add the calculator to either location, begin by selecting File > Options. Then choose either Customize Ribbon or Quick Access Toolbar, depending on where you want it. In the Choose commands from dropdown box, pick All Commands. Scroll down, click Calculator, and then hit the Add button to insert it into the toolbar. Note that if you choose to add it to your ribbon, you will have to create a custom group and add it there.

tips to save time in microsoft excel

Linking to Tabs or Cells

If your workbook contains several spreadsheets with data being cross-referenced between them, creating a direct link provides speedy access. This is especially helpful if you are sharing a workbook so that others can jump to that data quickly. Follow these simple steps to create the link:

  1. Select the cell containing the data that you want to link.
  2. Either right-click and select Hyperlink or go to the Insert tab and click Hyperlink in the ribbon.
  3. In the popup window, select Place in this Document.
  4. Then enter the text to display in that cell, a specific cell reference if desired, and the spreadsheet in the workbook with the data you are linking to.
  5. Click OK.

tips to save time in microsoft excel

Using Keyboard Shortcuts

If you are an avid Excel user, then keyboard shortcuts can certainly save you time. While there are almost too many keyboard shortcuts to list, here are several that can speed up your tasks. 3 Essential Time-Saving Excel Shortcuts You Should Know 3 Essential Time-Saving Excel Shortcuts You Should Know Excel can be a headache for the uninitiated, but with these shortcuts in hand, you’ll save yourself a ton of time going forward! Read More

  • F4 (or Fn + F4) to repeat the last command, including formatting changes such as color or font.
  • Alt + H, E, A to erase the contents, formatting, and other data attached to the selected cells.
  • Ctrl + W to close a spreadsheet and Ctrl + O to open one.
  • Ctrl + Shift + Colon to enter the current time and Ctrl + Shift + Semicolon for the current date.
  • Shift + F9 to calculate the active worksheet.
  • Shift + Tab to move to the previous cell or option.
  • Ctrl + Home to move to the beginning of the spreadsheet.
  • Ctrl + Page Down to move to the next spreadsheet in a workbook and Ctrl + Page Up to move to the previous one.

Working With AutoSum

Some might think that working with formulas in Excel is too time-intensive to get into. But even for simple equations, these built-in functions can definitely move your spreadsheet work along faster.

Unless you have moved or deleted it from your ribbon, the AutoSum button should be on your Home tab. This handy feature gives you the most common formulas with a click. You can add, count, or average a group of numbers or obtain the minimum or maximum of them. Just click the arrow on the AutoSum button to choose your formula.

tips to save time in microsoft excel

In addition to the AutoSum feature, your Formulas tab contains even more options. Each formula is grouped into a category to make it easy to find. You can select from financial, logical, math, statistical, or engineering functions.

But for the most widely-used formulas, the AutoSum feature is quick and convenient.

Using Simple Conditional Formatting

Conditional formatting is another one of those Excel features that many might find intimidating. However, for data that you want to see pop off the page, it’s a great tool.

For example, say you have a spreadsheet of data from a survey and at a quick glance you want to see how many Yes answers you have as opposed to No answers. These steps show you how to apply simple formatting.

  1. Select the cells containing the Yes/No answers.
  2. On the Home tab, click the Conditional Formatting dropdown box.
  3. Choose Highlight Cells Rules and then Text That Contains.
  4. Type the word Yes in the left box and choose the formatting for it from the right box.
  5. Follow the same steps for the No answers.

tips to save time in microsoft excel

You will then see all of the Yes and No answers formatted the way you chose, making them easy to spot.

If you plan to continue to add data, you can also apply this conditional formatting to the entire column or row instead of just a group of cells. This way, future data will be automatically formatted as you enter it. Eager to learn more? Have a look at our dedicated article on conditional formatting. Automatically Format Data in Excel Spreadsheets With Conditional Formatting Automatically Format Data in Excel Spreadsheets With Conditional Formatting Excel’s conditional formatting feature lets you format individual cells in an Excel spreadsheet based on their value. We show you how to use this for various everyday tasks. Read More

Quickly Inserting Charts

The Charts feature within Excel is a terrific tool for displaying your data visually. And, you can choose from a variety of chart types such as pie, bar, line, column, and many others.

Using the above example of conditional formatting for Yes/No answers, you can insert a chart with just a few clicks.

  1. Select the cells containing the Yes/No answers.
  2. On the Insert tab, click Recommended Charts. With this option, Excel will take your data and put it into the type of chart it fits best.
  3. If you like the chart, click OK and it will be inserted into your spreadsheet.

tips to save time in microsoft excel

This is the easiest and fastest way to create a chart in Excel and takes only a minute. However, if you do not like the chart created for you, you can click the All Charts tab in the popup window and experiment with other types.

For further information on formatting your chart, learn all about creating a pie chart. How to Create a Pie Chart in Microsoft Excel How to Create a Pie Chart in Microsoft Excel Everyone can create a simple pie chart. But can you format it to perfection? We’ll take you through the process, one step at a time. Read More

 Sorting With Filters

When you have a spreadsheet containing many columns of data, you may want to sort or filter it all by a certain column. While there are a couple of ways you can do this, using a filter is the quickest and safest way to do it.

  1. Select the entire sheet by clicking the triangle button next to your first column at the top left.
  2. On the Home tab, click Sort & Filter.
  3. Choose Filter.

That’s it! This fast move will put an arrow into the first row for each of your columns. When you click an arrow, you can sort the entire sheet by that column in the way you choose. If it’s a date field, you can sort from oldest to newest and if it’s a text field, you can sort alphabetically.

In addition, you can filter the data to see only the entries you want. When you click an arrow you will notice checkboxes next to your entries. Marking and unmarking these boxes will filter the data so that you see exactly what you need.

tips to save time in microsoft excel

The nice thing about using the Filter feature is that it does not negatively affect the rest of your data. If you sort an entire sheet, Excel will adjust all columns. And if you filter, Excel will simply hide what you do not want to see.

Using the Format Painter

If you use other Microsoft Office applications such as Word, you may already be familiar with the Format Painter. In Excel, this convenient tool lets you apply the same formatting from one or more cells to others with a single click.

  1. Select the cell, group of cells, row, or column that you want to copy the formatting from.
  2. On the Home tab, click Format Painter.
  3. Select the cell, group of cells, row, or column that you want to copy the formatting to.

This is a fantastic way to quickly apply helpful formatting of cells to others without manual work.

 Switching and Viewing Windows

Are there times when you need to work with more than one Excel workbook at the same time? Maybe you need to review data, compare it, or even copy data from one workbook to another. Excel provides a useful set of viewing features to help. Head over to the View tab to check out these options.

  • Arrange All: When you click this button, you can arrange all of your open workbooks on one screen. Choose from a tiled, horizontal, vertical, or cascade view.
  • View Side by Side: This option lets you choose two open workbooks to view next to or on top of each other, which is perfect for comparisons.
  • Switch Windows: Click this button when you have many Excel workbooks open at once and want to switch between them quickly. No minimizing and maximizing windows is necessary with this awesome feature.

tips to save time in microsoft excel

 Installing Handy Add-Ins

Office Add-ins are similar to browser extensions in that they are tools to enhance your application experience, data, and efficiency. And in Excel, you have many helpful add-ins to choose from depending on your needs.

Select the Insert tab and click Store. You can then check out tools by category. For instance, the Productivity category contains add-ins for document automation and a template gallery. And, the Project Management category has add-ins for Gantt charts and activity timers.

tips to save time in microsoft excel

Some add-ins are free while others are paid, so be sure to check the details before installing one. And if you are looking for free Excel add-ins to help with visualizations, we have you covered.

 

Original article in https://www.makeuseof.com/tag/7-tips-save-time-microsoft-excel/

Windows 10 annoyances

Read More

1. You can not map a network drive with different users on the same remote server.
Microsoft says “it is by design”. Why?. There is no clear answer… but there are no technical barriers.

2. Control Panel has disappeared.
But there is no substitute for many functionalities.

3. Selecting default app for a file extension
You can not add easily a more detailed command.

4. Unstoppable automatic updates
Microsoft has decided: if you have Windows Home, your system will be updated whatever your circumstances, you might defer it for a while, but that is all.
Additionally, your system will auto reboot at some point in the next 24 hours.
They do not realise the task you might be doing could be much more important than any security threat.

5. Cortana
It does by default whatever a genius has decided in each update. At least, you can disable it completely.
Additionally, you have to send to MS your private life for it to work.

6. Edge
It is simply not compatible with a lot of web pages.

7. Select all context menu option
Select all, has disappeared almost everywhere. The button is hidden in Office as a customization.

8. Initial crapware

9. Take out apps or utils, instead of adding new ones
Modems, DVD, Fax, etc. are out of fashion, there is no need for MS to update the software, but take it out…?

10. Difficult to set a local account.
Microsoft is trying to make local accounts a thing of the past and push all new Windows 10 users to a Microsoft account.
To create a local account during setup, you may have to disconnect the computer from the Internet

11. Sign in with a local account instead of a Microsoft account
They are really trying to hide how to do it. Unfortunately, this is giving a clue that in a future update iteration, it is going to dissppear, creating big additional problems for the end user.

12. Not stopping telemetry completely.
You just have the possibility of sending a Basic set.
Update
Open the Task Scheduler. Modify the entry Microsoft/Windows/Application Experience/Microsoft Compatibility Appraiser to Disable.

13. Deciding how to see folders depending on content
Windows tries to be more intelligent than you on deciding how to see things on the file explorer

14. Right-button context menu functionality, changing on updates

15. More, more and more tasks running in the background.
No idea of what they are doing, they are possibly there for some reason, but MS and software companies are disconsiderate with resources.

Bash Reference

Read More

The Shebang (#!)

  • In the beginning, first line of the file, no spaces.
  • Next, absolute path to the script interpreter (might change, but better to execute anywhere), in this case: /bin/bash
  • Call to the script does not look in current directory, so ./ is necessary or it has to be included in PATH

Special System Variables

  • $0 – The name of the Bash script.
  • $1 – $9 – The first 9 arguments to the Bash script.
  • $# – How many arguments were passed to the Bash script.
  • $@ – All the arguments supplied to the Bash script.
  • $? – The exit status of the most recently run process.
  • $$ – The process ID of the current script.
  • $USER – The username of the user running the script.
  • $HOSTNAME – The hostname of the machine the script is running on.
  • $SECONDS – The number of seconds since the script was started.
  • $RANDOM – Returns a different random number each time is it referred to.
  • $LINENO – Returns the current line number in the Bash script.

Variable Assignment

variable=value

  • No $ sign at the beginning.
  • No space at either side of the equal.
  • Case sensitive.
  • Variables set by a program must not have = or nul, but for the shell environment, they have more limitations: consist solely of uppercase letters, digits, and the ‘_’ (underscore) and do not begin with a digit. User variables follow the C variable definition rules (lowercase allowed). Regex:[a-zA-Z_]+[a-zA-Z0-9_]*

Quotes

Bash uses a space to determine separate items. When we enclose our content in quotes we are indicating to Bash that the contents should be considered as a single item. You may use single quotes ( ‘ ) or double quotes ( ” ).

  • Single quotes will treat every character literally.
  • Double quotes will allow you to do substitution (that is include variables within the setting of the value) nvar="Add $var"

Command Substitution

The output of command or program is saved into a variable variable=$(command) ex. directoryls=$(ls -al)
Adequate for just one word or line, newlines are removed and stored in a single line in the variable.

Exporting Variables

Exporting variables make them available for child subprocesses created in the running script
export var
Note: exporting a variable to the environment only works in the interactive console, not in scripts. To export it, modify /etc/environment from a script

Arithmetic

    • let expression Make a variable equal to an expression. Ex. let a=5+4
    • expr expression Print out the result of the expression.
    • $(( expression )) Return the result of the expression.
    • ${#var} Return the length of the variable var.
Operator Operation
+, -, /*, / addition, subtraction, multiply, divide
var++ Increase the variable var by 1
var– Decrease the variable var by 1
% Modulus (Return the remainder after division)

 

Control Statements

IF
if [ <some test> ] then
<commands>
elif [ <some test> ] then
<different commands>
else
<other commands>
fi

CASE
case <variable> in
<pattern 1>)
<commands>
;;
<pattern 2>)
<other commands>
;;
esac

WHILE

while [ <some test> ] do
<commands>
done

UNTIL

until [ <some test> ] do
<commands>
done

FOR

for var in <list>
do
<commands>
done

SELECT Present list items for selection with a number before each item
select var in <list>
do
<commands>
done

break Goes out of the loop
continue Goes to the beginning of next iteration
Range ex. for value in {1..5}
Range with step ex. for value in {10..0..2}

Operator Description
&& And
|| Or
! EXPRESSION The EXPRESSION is false.
-n STRING The length of STRING is greater than zero.
-z STRING The lengh of STRING is zero (ie it is empty).
STRING1 = STRING2 STRING1 is equal to STRING2
STRING1 != STRING2 STRING1 is not equal to STRING2
INTEGER1 -eq INTEGER2 INTEGER1 is numerically equal to INTEGER2
INTEGER1 -gt INTEGER2 INTEGER1 is numerically greater than INTEGER2
INTEGER1 -lt INTEGER2 INTEGER1 is numerically less than INTEGER2
-d FILE FILE exists and is a directory.
-e FILE FILE exists.
-r FILE FILE exists and the read permission is granted.
-s FILE FILE exists and it’s size is greater than zero (ie. it is not empty).
-w FILE FILE exists and the write permission is granted.
-x FILE FILE exists and the execute permission is granted.

 

Functions

function <name> or <name>() {  <commands>  } Create a function called name. Must appear in the script before any calls to the function. Arguments are passed as to the script $1, $2…
return <value> Exit the function with a return status of value.
local <name>=<value>  Create a local variable within a function.
command <command> Run the command with that name as opposed to the function with the same name.

print_something () {
echo Hello $1
return 5
}
print_something Mars
print_something Jupiter
echo The previous function has a return value of $?

Hello Mars
Hello Jupiter
The previous function has a return value of 5

tput


#!/bin/bash
# Print message in center of terminal
cols=$( tput cols )
rows=$( tput lines )
message=$@
input_length=${#message}
half_input_length=$(( $input_length / 2 ))
middle_row=$(( $rows / 2 ))
middle_col=$(( ($cols / 2) - $half_input_length ))
tput clear
tput cup $middle_row $middle_col
tput bold
echo $@
tput sgr0
tput cup $( tput lines ) 0

tput cols will tell us how many columns the terminal has.
tput lines will tell us how many lines (or rows) the terminal has.
Take all the command line arguments and assign them to a single variable message.
Find out how many characters are in the string message. We had to assign all the input values to the variable message first as ${#@} would tell us how many command line arguments there were instead of the number of characters combined.
We need to know what 1/2 the length of the string message is in order to center it.
Calculate where to place the message for it to be centered.
tput clear will clear the terminal.
tput cup will place the cursor at the given row and column.
tput bold will make everything printed to the screen bold.
Now we have everything set up let’s print our message.
tput sgr0 will turn bold off (and any other changes we may have made).
tput cup $( tput lines ) 0Place the prompt at the bottom of the screen.

Bash Tutorial
Advanced Bash Scripting

Check Ubuntu Hardware

Read More

List summary of hardware:
lshw -short
List summary of PCI devices:
lspci -v

H/W path Device Class Description
===========================================================
system PowerEdge R420 (SKU=NotProvided;ModelName=PowerEdge R420)
/0 bus 0K29HN
/0/0 memory 64KiB BIOS
/0/400 processor Intel(R) Xeon(R) CPU E5-2403 v2 @ 1.80GHz
/0/400/700 memory 128KiB L1 cache
/0/400/701 memory 1MiB L2 cache
/0/400/702 memory 10MiB L3 cache
/0/401 processor Intel(R) Xeon(R) CPU E5-2403 v2 @ 1.80GHz
/0/401/703 memory 128KiB L1 cache
/0/401/704 memory 1MiB L2 cache
/0/401/705 memory 10MiB L3 cache
/0/1000 memory 16GiB System Memory
/0/1000/0 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0,6 ns)
/0/1000/1 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0,6 ns)
/0/1000/2 memory DIMM DDR3 Synchronous [empty] /0/1000/3 memory DIMM DDR3 Synchronous [empty] /0/1000/4 memory DIMM DDR3 Synchronous [empty] /0/1000/5 memory DIMM DDR3 Synchronous [empty] /0/1000/6 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0,6 ns)
/0/1000/7 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0,6 ns)
/0/1000/8 memory DIMM DDR3 Synchronous [empty] /0/1000/9 memory DIMM DDR3 Synchronous [empty] /0/1000/a memory DIMM DDR3 Synchronous [empty] /0/1000/b memory DIMM DDR3 Synchronous [empty] /0/100 bridge Xeon E7 v2/Xeon E5 v2/Core i7 DMI2
/0/100/1 bridge Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 1a
/0/100/1/0 scsi0 storage MegaRAID SAS 2008 [Falcon] /0/100/1/0/0.20.0 generic BP12G+
/0/100/1/0/2.0.0 /dev/sda disk 999GB PERC H310
/0/100/1/0/2.0.0/1 /dev/sda1 volume 243MiB Linux filesystem partition
/0/100/1/0/2.0.0/2 /dev/sda2 volume 930GiB Extended partition
/0/100/1/0/2.0.0/2/5 /dev/sda5 volume 930GiB Linux LVM Physical Volume partition
/0/100/3 bridge Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3a
/0/100/5 generic Xeon E7 v2/Xeon E5 v2/Core i7 VTd/Memory Map/Misc
/0/100/5.2 generic Xeon E7 v2/Xeon E5 v2/Core i7 IIO RAS
/0/100/11 bridge C600/X79 series chipset PCI Express Virtual Root Port
/0/100/16 communication C600/X79 series chipset MEI Controller #1
/0/100/16.1 communication C600/X79 series chipset MEI Controller #2
/0/100/1a bus C600/X79 series chipset USB2 Enhanced Host Controller #2
/0/100/1c bridge C600/X79 series chipset PCI Express Root Port 1
/0/100/1c.4 bridge C600/X79 series chipset PCI Express Root Port 5
/0/100/1c.4/0 em1 network NetXtreme BCM5720 Gigabit Ethernet PCIe
/0/100/1c.4/0.1 em2 network NetXtreme BCM5720 Gigabit Ethernet PCIe
/0/100/1c.7 bridge C600/X79 series chipset PCI Express Root Port 8
/0/100/1c.7/0 bridge SH7757 PCIe Switch [PS] /0/100/1c.7/0/0 bridge SH7757 PCIe Switch [PS] /0/100/1c.7/0/0/0 bridge SH7757 PCIe-PCI Bridge [PPB] /0/100/1c.7/0/0/0/0 display G200eR2
/0/100/1c.7/0/1 bridge SH7757 PCIe Switch [PS] /0/100/1d bus C600/X79 series chipset USB2 Enhanced Host Controller #1
/0/100/1e bridge 82801 PCI Bridge
/0/100/1f bridge C600/X79 series chipset LPC Controller
/0/100/1f.2 storage C600/X79 series chipset 6-Port SATA AHCI Controller
/0/1 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 0
/0/2 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1
/0/4 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 0
/0/6 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 1
/0/7 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 2
/0/8 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 3
/0/9 generic Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers
/0/a generic Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers
/0/b generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/c generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/d generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/e generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/f generic Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0
/0/10 generic Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0
/0/11 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Target Address/Thermal Registers
/0/12 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 RAS Registers
/0/13 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/14 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/15 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/16 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/17 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 0
/0/18 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 1
/0/19 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 0
/0/1a generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 1
/0/1b generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 2
/0/1c generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 3
/0/1d generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 3
/0/1e generic Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe
/0/1f generic Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe
/0/20 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers
/0/21 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring
/0/22 generic Xeon E7 v2/Xeon E5 v2/Core i7 System Address Decoder
/0/23 generic Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers
/0/24 generic Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers
/0/3 bridge Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3a
/0/5 generic Xeon E7 v2/Xeon E5 v2/Core i7 VTd/Memory Map/Misc
/0/5.2 generic Xeon E7 v2/Xeon E5 v2/Core i7 IIO RAS
/0/25 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 0
/0/26 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1
/0/27 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 0
/0/28 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 1
/0/29 generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 2
/0/2a generic Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 3
/0/2b generic Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers
/0/2c generic Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers
/0/2d generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/2e generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/2f generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/30 generic Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers
/0/31 generic Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0
/0/32 generic Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0
/0/33 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Target Address/Thermal Registers
/0/34 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 RAS Registers
/0/35 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/36 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/37 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/38 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers
/0/39 generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 0
/0/3a generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 1
/0/3b generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 0
/0/3c generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 1
/0/3d generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 2
/0/3e generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 3
/0/3f generic Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 3
/0/40 generic Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe
/0/41 generic Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe
/0/42 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers
/0/43 generic Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring
/0/44 generic Xeon E7 v2/Xeon E5 v2/Core i7 System Address Decoder
/0/45 generic Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers
/0/46 generic Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers

How to check the MySql version

Read More

Create a query with:

SHOW VARIABLES LIKE "%version%";

Result is similar to:

Variable_name            Value                         
-----------------------  ------------------------------
innodb_version           5.6.35                        
protocol_version         10                            
slave_type_conversions                                 
version                  5.6.35-log                    
version_comment          MySQL Community Server (GPL)  
version_compile_machine  x86_64                        
version_compile_os       Win64

Commands to check spam in Ubuntu with Postfix

Read More

mailq   Watch the mail queue
postfix -f  Flush the mail queue
postsuper -d ALL To remove all mails from the queue
postsuper -d deferred deferred To remove all mails in the deferred queue
find /var/spool/postfix/deferred -type f | wc -l    To know the number of messages sitting in the deferred queue
postcat -vq ID To view message content in queue with ID
qshape active Display number of emails being sent to each domain and how long they have been in the active queue
qshape deferred Display differed queue
tail -f /var/log/mail.log View the log in realtime
To check mail log for sent messages
cat /var/log/mail.log |grep -v "relay=local" |grep "relay=" |grep "status=sent"

To get statistics, install a script:

wget http://jimsun.linxnet.com/downloads/pflogsumm-1.1.1.tar.gz
tar -zxf pflogsumm-1.1.1.tar.gz
chown root:root pflogsumm-1.1.1
cd pflogsumm-1.1.1
cat /var/log/mail.log | ./pflogsumm.pl

You can move pflogsumm.pl to /usr/local/bin

To send a weekly report

Create /etc/cron.weekly/mailreport
#!/bin/sh
#
# mailreport cron weekly
MailSubject="Email report $(date +%d-%m-%Y)"
cat /var/log/mail.log | /usr/local/bin/pflogsumm.pl | /usr/bin/mailx -s "$MailSubject" your.mail@domain.com
exit 0

Change file permissions to read, execute
chown root:root /etc/cron.weekly/mailreport
chmod 755 /etc/cron.weekly/mailreport

Report today problems

pflogsumm -d today /var/log/mail.log --problems_first

Get permanent errors hard bounces
grep " dsn=5." /var/log/mail.log | grep -o -P " to=<(.+?)>" | sort | uniq -c
Get soft bounces
They start with 4…
grep " dsn=4." /var/log/mail.log | grep -o -P " to=<(.+?)>" | sort | uniq -c

To check user logins

grep "sasl_method=LOGIN" /var/log/mail.log

Opening Web-hyperlinked Microsoft Office documents in read-write mode

Read More

Microsoft Office in a webdav or hyperlynked will open as read only. To change the default behavior and open as read-write:

Set OpenDocumentsReadWriteWhileBrowsing DWORD Value on a client machine under the key
 HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Common\Internet

Set the Value data to 1.

This does not address the issue of the server service file permissions.

 

Executing commands from PHP to the operating system

Read More

The system() Function

The system function in PHP takes a string argument with the command to execute as well as any arguments you wish passed to that command. This function executes the specified command, and dumps any resulting text to the output stream (either the HTTP output in a web server situation, or the console if you are running PHP as a command line tool). The return of this function is the last line of output from the program, if it emits text output.

The exec() Function

The system function is quite useful and powerful, but one of the biggest problems with it is that all resulting text from the program goes directly to the output stream. There will be situations where you might like to format the resulting text and display it in some different way, or not display it at all.

For this, the exec function in PHP is perfectly adapted. Instead of automatically dumping all text generated by the program being executed to the output stream, it gives you the opportunity to put this text in an array returned in the second parameter to the function:

The shell_exec() Function

Most of the programs we have been executing thus far have been, more or less, real programs1. However, the environment in which Windows and Unix users operate is actually much richer than this. Windows users have the option of using the Windows Command Prompt program, cmd.exe This program is known as a command shell.

The passthru() Function

One fascinating function that PHP provides similar to those we have seen so far is the passthru function. This function, like the others, executes the program you tell it to. However, it then proceeds to immediately send the raw output from this program to the output stream with which PHP is currently working (i.e. either HTTP in a web server scenario, or the shell in a command line version of PHP).

The proc_open() Function and popen() function

proc_open() is similar to popen() but provides a much greater degree of control over the program execution. cmd is the command to be executed by the shell. descriptorspec is an indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. pipes will be set to an indexed array of file pointers that correspond to PHP’s end of any pipes that are created. The return value is a resource representing the process; you should free it using proc_close() when you are finished with it.