=================================================================
Syslog and the logging command will only send the logs generated by the device to the local logs and then the syslog server you specify.
Not everything that happens is picked up in the logs. This is especially true when you set your logging level above informational.
SNMP and SNMP traps are used to keep an eye on specific aspects of your device and state.
When traps are configured they are programmed into the device to watch for specific OID values and alert when they hit those values.
=============================================================
SYSLOG: This is a logging facility. If you are familiar with Windows, you have no doubt, used this type of logging, like the Event Viewer.
For Unix/Linux, this would be your /var/log/messages). It gives you various details of the happenings of the equipment,
from logs dealing only with ERRORs, to HUGE log files of DEBUG logs, telling you everything that the equipment is doing.
SNMP TRAP: These are asynchronous events, sent to a central management system.
They are essentially triggers, that tell the management system, that something happened, such as a configuration change, or a link failure.
Your management system can then take action, such as notifying a tech.
==============================================================
[root@gw-server~]# cat /etc/exports
/TCC_depot *(ro,insecure,no_root_squash,no_subtree_check)
Do Not Use the no_root_squash Option
By default, NFS shares change the root user to the nfsnobody user, an unprivileged user account.
This changes the owner of all root-created files to nfsnobody, which prevents uploading of programs with the setuid bit set.
If no_root_squash is used, remote root users are able to change any file on the shared file system and leave applications infected by Trojans for other users to inadvertently execute
The option 'root_squash' causes files acessed/created by 'root' on the NFS client to be given the permissions of a non-root user on the NFS server.
The idea is to increase security by preventing a ownership of the root account on one system 'migrating' to the server.
The option 'no_root_squash' basically allows the root user on the client to access/create files on the NFS server as root.
Typically this is needed if you are hosting root filesystems on the NFS server (for diskless clients). If you don't things break
===========================================================
grep you can use -B num to set how many lines before the match and -A num for the number of lines after the match.
grep -B 3 -A 2 foo README.txt
If you want the same number of lines before and after you can use -C num.
grep -C 3 foo README.txt
This will show 3 lines before and 3 lines after.
==========================================================
swapping is not that bad these days, no we changed nothing, usually default value is 40 (swappiness=40)
so after 40% of total ram usage unused files will be paged to SWAP.
Bad things happens when system HAS to use SWAP as primary memory pool due to 100% ram usage
=========================================================
A CPU governor is a power management mechanism in the Linux kernel that dynamically adjusts the CPU's frequency based on system load. The main purpose of a CPU governor is to balance performance and power consumption.
Types of CPU Governors
There are several types of CPU governors, each with different strategies for adjusting the CPU frequency:
Performance: Sets the CPU to run at the maximum frequency all the time. This ensures the best performance but consumes more power.
Powersave: Sets the CPU to run at the minimum frequency all the time. This conserves power but can result in lower performance.
Ondemand: Dynamically adjusts the CPU frequency according to the current system load. It quickly scales up the frequency when the load increases and scales it down when the load decreases.
Conservative: Similar to Ondemand, but it scales the CPU frequency more gradually, resulting in smoother transitions and potentially less power usage.
Userspace: Allows user-space programs or scripts to set the CPU frequency. This provides maximum flexibility for custom power management policies.
Schedutil: Integrates with the Linux kernel scheduler to make smarter decisions about CPU frequency scaling based on task scheduling and load.
Post a Comment