DEV Community

technonotes-hacker
technonotes-hacker

Posted on

Promotion - UNIX / Linux Basics - 1

kernel sysctl parameter should be tuned to increase the maximum number of queued incoming TCP connections awaiting acceptance

  • net.core.somaxconn --> maximum socket listen backlog queue size for incoming connections.
  • This is mainly for TCP connection backlog queue is overflowing

data-reconciliation batch utility is consuming excessive CPU cycles

  • what is data-reconciliation ? the systematic process of comparing, verifying, and fixing datasets from different sources to ensure they are accurate, consistent, and complete - தரவு சரிசெய்தல்.

  • A higher nice value means lower scheduling priority.

  • A lower nice value means higher scheduling priority

renice +n 19 -p [PID]
n stands for the "niceness"
Enter fullscreen mode Exit fullscreen mode

If you are writing a script for BULK update accounts , you want the script to immediately abort if any single command in a pipeline fails.

set -euo pipefail
Correct! -e exits on error, -u exits on unset variables, and -o pipefail ensures pipeline failures propagate correctly.
Enter fullscreen mode Exit fullscreen mode

no new transaction files can be written to the /data/txn partition , running df -h shows that the file system utilization is only at 48% capacity , bottleneck causing this failure?

  • Inode exhaustion on the partition
  • what is Inode exhaustion ? your file system has completely run out of available inodes (Index Nodes), even if you still have plenty of free gigabytes (GB) of actual disk space left.
  • Think of an inode as a metadata file in a library card catalog.
  • Every single file, directory, or link on a Linux partition requires exactly one inode to store its details (like file size, owner, permissions, and where the data blocks are physically located on the disk).
  • When a partition is formatted, a fixed number of inodes is allocated. This number usually cannot be changed without reformatting the drive.
df -i
Enter fullscreen mode Exit fullscreen mode

unauthorized root access attempts on a critical RHEL-based core banking server

/var/log/secure
/var/log/auth.log
Enter fullscreen mode Exit fullscreen mode
  • record authentication-related events, PAM notices, and sudo attempts.

finbatch is created to run automated night batch jobs , how to avoid this account from interactive terminal ?

/sbin/nologin
/bin/false
Enter fullscreen mode Exit fullscreen mode
  • Setting these shell will gracefully rejects interactive login attempts while permitting system process execution.

end-of-day batch reporting script runs with user dbadmin , but consistently fails with command not found errors sqlplus: not found when triggered via cron , root cause of this execution discrepancy?

  • Cron initializes a minimal environment (often /usr/bin:/bin), omitting user-profile paths where specialized tools like Oracle sqlplus reside.
  • The cron daemon executes jobs with a minimal, restricted PATH environment variable.

end-of-day (EOD) interest calculation batch script is running , sudden high memory allocation, the Linux Out-of-Memory (OOM) killer targets , terminates a critical background database listener process instead of the non-essential batch job , to prevent , how can you configure the database listener process to be disfavored by the OOM killer?

Adjusting oom_score_adj to a strongly negative value (e.g., -1000) prevents the kernel from selecting that specific process during OOM events.

Write a negative value to /proc/[pid]/oom_score_adj for the listener process
Enter fullscreen mode Exit fullscreen mode


Question


Question

  • What is file descriptor constraint?


ulimit -n
ulimit -Hn
ulimit -n 4096
/etc/security/limits.conf
Enter fullscreen mode Exit fullscreen mode

Notes

Top comments (0)