Last active
August 31, 2024 01:45
-
-
Save forstie/572c20da61511e3b798a37a7e61e4e98 to your computer and use it in GitHub Desktop.
I was asked to provide a query that pulls together some of the basic identity detail for the IBM i you're connect to... which got me to this....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Who am i? | |
-- | |
select s.host_name, e.host_name, 'IBM i ' concat os_version concat '.' concat os_release as ibmi_level, | |
serial_number, machine_type, machine_model, | |
ipl_mode, ipl_type, attention_light, | |
total_cpus, e.configured_cpus, | |
configured_memory, total_memory, | |
s.* | |
from sysibmadm.env_sys_info e, qsys2.system_status_info s; | |
-- https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzajq/rzajqviewenvinfo.htm | |
-- https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzajq/rzajqviewsysstatusinfo.htm | |
which got me thinking to add:
(SELECT MAX(PTF_IDENTIFIER) FROM QSYS2.PTF_INFO WHERE PTF_TECHNOLOGY_REFRESH_PTF = 'YES' and PTF_LOADED_STATUS ='PERMANENTLY APPLIED') as TR_PTF
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add the following somewhere in the select:
(SELECT Processor_Group FROM Qsys2.License_Info FETCH FIRST ROW ONLY) AS P_Group