Note: Buckling ratio k=5.4 >1 what doesn't mean that safety margin for buckling is 5.4
This is true only for very flexible structures (Euler's buckling is real). In general case you should use code requirements to estimate real safety ratio. Euler's results can be used for estimation of effective length of column Lef. Just use the formula:
K*Static_Axial_Force = 3.14^2 *E*J/Lef^2
Lef = 3.14*(E*J/(K*abs(static_axial_force)))^0.5
where all parameters are taken for Euler's formula for elastic buckling (E - Young's Modulus, J - bending moment of inertia, etc).
K and Static_Axial_Force obtained for the same (lower) mode
Code requirements take into account plastic properties of material, real safety margin will be lower than 5.4