Giter VIP home page Giter VIP logo

kcare-uchecker's Introduction

kcare-uchecker

CI

A simple tool to detect outdated shared libraries still linked to processes in memory

Usage

Simple script run will looks like

$ curl -s -L https://kernelcare.com/uchecker | sudo python
[*] Process httpd[15516] linked to the `libc-2.17.so` that is not up to date.

You may want to update libraries above and restart corresponding processes.

KernelCare+ allows to resolve such issues with no process downtime. To find 
out more, please, visit https://tuxcare.com/enterprise-live-patching-services/libcare/

Troubleshooting

For more verbose output you can choose logging level from ERROR, WARNING, INFO and DEBUG. For example

$ curl -s -L https://kernelcare.com/uchecker | sudo LOGLEVEL=debug python

About

The project is part of tuxcare.com - livepatching solution for linux kernels as well as shared libraries like glibc and openssl

kcare-uchecker's People

Contributors

fabaff avatar grubberr avatar histrio avatar iseletsk avatar joaocorreiacl avatar nautics889 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kcare-uchecker's Issues

Arch support

Arch Linux is not supported

$ python uchecker.py 
Distro `arch-linuxrolling` is not supported

[Feature Request] Support Debian Bullseye (11) and Ubuntu Focal (20.04)

This project does not currently work on Debian Bullseye (11) or Ubuntu Focal (20.04).

Debian Bullseye (11):

> curl -s -L https://kernelcare.com/uchecker | sudo python
Distro `debian11.0` is not supported

Ubuntu Focal (20.04):

> curl -s -L https://kernelcare.com/uchecker | sudo python
Distro `ubuntu-focal` is not supported

Support for Focal should be a high priority, given that it is the current Ubuntu LTS release. There is already support for the previous Ubuntu LTS release (Bionic/18.04).

On the Debian side, Bullseye is currently the testing distribution; however, it will be released and become Debian Stable in the next couple months.

Distro `` is not supported

running curl -s -L https://kernelcare.com/uchecker | sudo python on Amazon Linux AMI release 2018.03 produces:

Distro `` is not supported

Error while mmaped file access

Traceback (most recent call last): File “”, line 298, in File “”, line 277, in main File “”, line 246, in iter_proc_lib File “”, line 181, in __init__ File “”, line 187, in _get_vma ValueError: Offset 0 is not in ranges [Vma(offset=81920, size=8192, start=139801789513728, end=139801789521920)]

Alma linux support

alma linux should just work since it is a drop in replacement for centos,

Zero length field name in format

[root@localhost vagrant]# python --version
Python 2.6.6
  File "uchecker.py", line 274, in iter_maps
    with open('/proc/{:d}/maps'.format(pid), 'r') as mapfd:
ValueError: zero length field name in format

support Rocky linux

Rocky is a drop in replacement for cent os, running kcare-uchecker outputs the following error,
Distro rocky-linux8.4 is not supported

Strings and bytes encoding errors

Traceback (most recent call last):
  File "<stdin>", line 196, in <module>
  File "<stdin>", line 164, in get_dist
  File "<stdin>", line 100, in _linux_distribution
TypeError: must be str or None, not bytes

in python 3.8.2 and 3.9.1

TypeError: a bytes-like object is required, not 'str'

Just installed 0.1.0:

❯ sudo uchecker
Traceback (most recent call last):
  File "/usr/bin/uchecker", line 33, in <module>
    sys.exit(load_entry_point('kcare-uchecker==0.1.0', 'console_scripts', 'uchecker')())
  File "/usr/bin/uchecker", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/uchecker.py", line 196, in <module>
    DIST = get_dist()
  File "/usr/lib/python3.9/site-packages/uchecker.py", line 164, in get_dist
    name, version, codename = linux_distribution()
  File "/usr/lib/python3.9/site-packages/uchecker.py", line 100, in _linux_distribution
    for line in lsb_release_raw.split('\n'):
TypeError: a bytes-like object is required, not 'str'
❯ lsb_release -a
LSB Version:	n/a
Distributor ID:	ManjaroLinux
Description:	Manjaro Linux
Release:	20.2.1
Codename:	Nibia

Regression after #16

Cant't read buildID from /usr/lib64/python2.7/lib-dynload/_json.so: TypeError('Struct() argument 1 must be string, not unicode',) for the most of binaries

Python 3.8 compatibility

I read that the platform.linux_distribution function was removed
in Python 3.8. Can compatibility be added?

Traceback (most recent call last):
  File "/usr/sbin/uchecker", line 33, in <module>
    sys.exit(load_entry_point('kcare-uchecker==0.1.0b1', 'console_scripts', 'uchecker')())
  File "/usr/sbin/uchecker", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/uchecker.py", line 59, in <module>
    DIST, _, _ = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'

Debian 12 (bookworm) support

Would it be possible to add Debian 12 support?

/opt/uchecker# ./uchecker.py
Distro `debian-gnu/linux12` is not supported

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.