Updating the Linux kernel on Hetzner servers

It took one day to update the CentOS kernel on the server in Hetzner, which worked without rebooting for about 2 years.

I looked at various information about the system, the versions of the installed kernels and the running kernel:

lsb_release -a
uname -r
uname -a
cat /proc/version
sudo rpm -q kernel
ls /boot | grep vmlinuz

Updated kernel:

yum -y update

Rebooted the server using the link in cPanel https://example.com:2087/scripts/dialog?dialog=reboot

You can also use the command:

reboot

After rebooting the server did not start, I immediately made a request for technical support via the https://robot.your-server.de.
Technical support responded within two minutes, as they reported, the server did not respond to keystrokes, there was a black screen, after the physical shutdown and power-up, it successfully launched.
Here such there are cases of a reset, it is necessary to be ready to everything.
At the next reboots, hangup no longer occurred.

Dying gasp Alarm on Huawei OLT

Sometimes on Huawei OLT you can see Dying gasp Alarm (0x2e11a00b).

Since they often occur, most likely they can be seen by running the commands:

display alarm active alarmid 0x2e11a00b
display alarm history alarmid 0x2e11a00b

I will give an example:

ALARM 531377 FAULT MINOR 0x2e11a00b SERVICE QUALITY 2017-12-06 08:19:27+02:00
ALARM NAME : The dying-gasp of GPON ONTi (DGi) is generated
SRVEFF : SA
PARAMETERS : FrameID: 0, SlotID: 5, PortID: 6, ONT ID: 32, Equipment ID:
TL-GP110
DESCRIPTION : The ONT is power off
CAUSE : The power supply of the ONT is abnormal
ADVICE : Check the power supply of the ONT and ensure that the power
supply works in the normal state

These alarms occur when power is lost or the power cord is removed from the ONT, at this moment ONT manages to send the Dying gasp message to the OLT.
Dying gasp is also used on many other devices, for example, to correctly terminate the connection.

Opening and analysis of files created with NetFlow

Here is an example of viewing statistics:

cat ft-v05.2015-05-01.000759+0300 | flow-stat -f 10 -S 3 | less
cat ft-v05.2015-05-01.000759+0300 | flow-stat -n -p -w -f 26 -S 2 | less
flow-cat ft-v05.2017-12-07.170236+0200 | flow-print | less

You can see the flow-stat tips by typing:

man flow-stat

I will give an example of exporting data to another format (for example, in csv, which can then be opened in windows by any convenient program):

flow-cat ft-v05.2015-05-01.000759+0300 | flow-export -f 2 | less
flow-cat ft-v05.2015-05-01.000759+0300 | flow-export -f 2 > csv.csv

You can display the list with the specified source address with the following command:

flowdumper -se '"192.168.0.1" eq $srcip' ft-v05.2015-06-17.175701+0300

Export the list only with the specified source address to a file, for example, with the following command:

flowdumper -se '"192.168.0.1" eq $srcip' ft-v05.2015-06-17.175701+0300 > file.txt

Example of exporting from multiple files:

flowdumper -se '"192.168.0.1" eq $srcip' /backup/flows/acct/first/2016/2016-01/ft-v05.2015-06-17* > /backup/result.txt

See also:
Installing and using flow-tools

Restart Apple Watch

It was necessary recently to restart the watch Apple Watch 2, which began to visually slow to work.

1) The first thing you need to try to turn them off and turn it on.
To do this, the clock should be disconnected from the charger, then you need to press and hold the side button until the “Off” slider appears, on which you want to drag your finger.
After switching off, you must press the side button again to turn the clock on.

2) There is also the possibility of forced restart, which can be done for example when the clock does not respond.
To do this, press the side button and the wheel at the same time, then hold them for about 10 seconds until the Apple logo appears.
Forced restart can not be done when updates are being installed or they are launched (the Apple logo is displayed).

See also the video:

How to Delete an AliExpress Account

To delete an account on AliExpress, you need to enter into it by entering your login and password, then open “Profile Settings” and on the left in the menu select “Change Settings”.
In the window that opens, click “Deactivate Account”.

Then enter your email in the line “Enter your username:”, type “Deactivate my account” below, then specify the reason for deactivation and click “Deactivate my account”.

After that, the account will be inactive, but you can reactivate it if you want.

How to upgrade the Firmware of the ASUS RT-N12E Router

In order to update the firmware of the Asus RT-N12E router, you need to enter its settings by typing in the browser address http://192.168.0.1 and enter your login – admin, password – admin, see the firmware version that is installed, usually it is written at the very top, for example “Firmware version: 2.0.0.16”.

Check for a new version of the firmware on the official site and if it is there to download it:
http://www.asus.com/Networking/RTN12E/HelpDesk_Download

Next, open the menu “Administration“, select a tab “Firmware Upgrade“, press “Browse” and select the firmware file, click “Send” and wait for the update process to complete.

The configuration of the router remains unchanged.
If the update fails, the router can be restored using a utility that can also be downloaded from the link above.

Windows Hot Keys List

Here is the list of Windows hot keys:
Win + E (Explorer)
Win + Pause (Properties of the system)
Win + F1 (Windows Help)
Win + F (Search for files)
Win + Сtrl + F (Computer search)
Ctrl + Esc или Win (Menu Start)
Ctrl + Shift + Esc (Task Manager)
Win + D (Collapse all windows)
Win + R (The Run window)
Win + L (Block)
Printscreen (Screenshot)
Alt + Printscreen (Screenshot of the active window)
Win + Tab или Win + Shift + Tab (Switch between windows)
Alt +Tab (Easy switching between windows)
Ctrl + N (Creating a new object, document, opening a new window)
Ctrl + P (Printing)
Ctrl + Z (Undo the last action)
Alt + Enter (In some applications, switching to full screen mode and back)
F5 (updating the window)

Work with text:
Ctrl + A (select all)
Ctrl + C или Ctrl + Insert (copy to clipboard)
Ctrl + X или Shift + Delete (cut to clipboard)
Ctrl + V или Shift + Insert (paste from clipboard)
Ctrl + S (saving a document or project)
Ctrl + O (opening an object or document)
Ctrl + Home (move to the beginning of the document)
Ctrl + End (move to the end of the document)
Ctrl + Shift + left/right arrow (text selection by words)
Ctrl + left/right arrow (move the cursor by words)

Working with files:
Alt + Enter (When a selected object in the directory opens its properties)
F2 (object renaming)
Shift + F10 (context menu, like right-click)
Shift + Delete (the irrevocable removal of the object, bypassing the basket)
Enter (similar to double-clicking a mouse)
Delete (object deletion)
Ctrl + click (arbitrary selection)
Shift + click (highlight adjacent objects)
Ctrl + Shift + dragging with the mouse (create a shortcut)
Ctrl + dragging with the mouse (copying an object)
Shift + dragging with the mouse (object movement)

Working with dialog boxes:
Tab (move forward by options)
Shift + Tab (move to options backward)
Ctrl + Tab (moving tabs forward)
Ctrl + Shift + Tab (moving tabs backward)

When inserting a disk into the CD-ROM, the Shift key cancels the autorun of the contents of the disk.

Configuring graphs in Mikrotik

The graphs are an excellent tool for monitoring the device’s processor load, disk and RAM, voltage and temperature, and the amount of traffic transmitted through network interfaces.
Via Winbox or the web-based interface, the settings can be found in the “Tools” -> “Graphing” menu.

I will describe the following commands in order:

Frequency of recording of collected data (standard 5 minutes):

tool graphing set store-every 24hours|5min|hour

The refresh rate of the chart page (standard 300):

tool graphing set page-refresh integer|never

Graphing interface
The IP range from which graphs are allowed to be viewed (standard 0.0.0.0/0):

tool graphing interface allow-address ADDRESS

Description of the current record:

tool graphing interface comment TEXT

Determines whether the element is used:

tool graphing interface disabled yes|no

Determines which interface will be monitored (standard all):

tool graphing interface interface all|interface

Specifies whether to store collected information on the system disk (standard yes):

tool graphing interface store-on-disk yes|no

Graphing queue
The IP range from which graphs are allowed to be viewed (standard 0.0.0.0/0):

tool graphing queue allow-address ADDRESS

Whether to allow access to schedules from queue’s target-address (standard yes):

tool graphing queue allow-target yes|no

Description of the current record:

tool graphing queue comment TEXT

Determines whether the element is used:

tool graphing queue disabled yes|no

Which queues will be monitored (everything is standard):

tool graphing queue simple-queue all|NAME

Specifies whether to store collected information on the system disk (standard yes):

tool graphing queue store-on-disk yes|no

Graphing resource
The IP range from which graphs are allowed to be viewed (standard 0.0.0.0/0):

tool graphing resource allow-address ADDRESS

Description of the current record:

tool graphing resource comment TEXT

Determines whether the element is used:

tool graphing resource disabled yes|no

Specifies whether to store collected information on the system disk (standard yes):

tool graphing resource store-on-disk yes|no

You can see the graphs in the address bar of the browser http://ADDRESS/graphs/
If you reboot the router, the graphics will remain, if you update firmware, they will be deleted.

Where is AirPrint on the iPhone?

AirPrint can be accessed in the browser Safari, Mail, Camera, Photo, Maps and many other applications.
To send an item for printing, click the application icon

AirPrint and then click “Print” or the printer icon.

In order for the AirPrint function to work, it is necessary to be in the same Wi-Fi network with a printer that supports AirPrint or a computer with special software installed and a printer connected to it.