Skip to content

Instantly share code, notes, and snippets.

@forstie
Last active Jan 21, 2021
Embed
What would you like to do?
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....
--
-- 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
@bricevollmer

This comment has been minimized.

Copy link

@bricevollmer bricevollmer commented Dec 9, 2020

ProcessorGroup (P10, P20) would be good to add. Is that in a license table? Couldn't find the data in env_sys_info or system_status_info

What's the best way to search for what table(IBM i Service) a specific piece of info would be in, such as processor group?

@bdietz400

This comment has been minimized.

Copy link

@bdietz400 bdietz400 commented Jan 21, 2021

Just add the following somewhere in the select:
(SELECT Processor_Group FROM Qsys2.License_Info FETCH FIRST ROW ONLY) AS P_Group

@bdietz400

This comment has been minimized.

Copy link

@bdietz400 bdietz400 commented Jan 21, 2021

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