This paper investigates an online hierarchical scheduling problem on two uniform machines to minimize the total completion time of all jobs. Machine with a speed has a lower hierarchy and machine with a speed has a higher hierarchy. Each job has a unit processing time and a hierarchy. The job with a lower hierarchy can only be processed on the machine and the job with a higher hierarchy can be processed on any of the two machines. We consider two variants of the problem: and . For both variants, we provide parameter lower bounds and online algorithms with competitive ratio of and respectively, which are optimal in sense of constant bound.